Print Page | Close Window

formatting text from a webpage

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3389
Printed Date: 29 March 2026 at 6:45pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: formatting text from a webpage
Posted By: Sapien
Subject: formatting text from a webpage
Date Posted: 08 June 2003 at 1:48pm

I'm not really sure where to start with this. I'm VERY new to asp so I thought that the Web Wiz Guide would be a good place ot start for advice.

What I want to do is take information from a website. Typically a user would click on the page with their mouse to select it (the site uses frames) and press control-a to highlight it.

They would then press control-c to copy it to their clipboard. From their they will paste it into a textbox and press formatt.

Here is the part that has me clueless. I want to take some information, while ingoreing other information, and display it on a new web page in an easy to read manner.

So dose anybody know where I should look to learn how to selectivly take information and rearrange it to my needs.

P.S. I hate w3schools. It's written as if their explaining it to programmers. It's no good for new programmers.



-------------
If you can't do it on your own, your not trying hard enough!



Replies:
Posted By: MorningZ
Date Posted: 08 June 2003 at 7:57pm

you dont even give close to enough information to provide any help..

"want to show some information, but not others"

what's the criteria for what gets shown and what doesn't???

and there are about 45,874,928 other sites than w3schools to learn stuff from.. webmonkey.com, 4guysfromrolla.com, etc



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Sapien
Date Posted: 09 June 2003 at 2:46pm

ok, I'll try to elaborate a bit more.

Sombody will copie a webpage to their clipboard and past it into a textbox. The textbox will then send it to the script. I want this script to turn this:

Money: 41,947gc Peasants: 17,784 Food: 199,935 Bushels Runes: 98,201 Runes Networth: 318,465gc

As leader of your Province, you know that the peasantry rely on you to make the critical decisions that affect their everyday lives. You also know that you cannot do this alone. Your Council of Elders helps to keep track of all the hustle and bustle within your province. They now stand before you, ready to provide you with the information you need.

Select your area of inquiry:
http://u1.swirve.com/council.cgi?elder=1 - Affairs of the State    http://u1.swirve.com/council.cgi?elder=2 - Civilian Affairs    http://u1.swirve.com/council.cgi?elder=3 - Military Affairs    http://u1.swirve.com/council.cgi?elder=4 - Internal Affairs   
http://u1.swirve.com/council.cgi?elder=5 - Arts & Sciences    http://u1.swirve.com/council.cgi?elder=6 - Mystic Affairs    http://u1.swirve.com/council.cgi?elder=7 - Our History    http://u1.swirve.com/growth.cgi?rc=708028 - Kingdom Growth

Military Affairs

Sir Sapien, we have 5 generals available to lead our armies. One must always stay here to lead our forces in defense, but you may send the others out to combat at any time. Here is a list of our Generals' current activities and other military information:

Army Number: Standing Army #2 Army #3 Army #4 Army #5
Status Available Unavailable
(8.90 days)
Unavailable
(8.90 days)
Unavailable
(8.91 days)
Unavailable
(8.91 days)
Soldiers 1214 0 0 0 0
Harpies 727 3465 0 3465 0
Griffins 16,226 0 0 0 0
Drakes 5357 200 0 200 0
War Horses 0 0 0 0 0
Captured Land --- 0 0 0 0

Training - Number of Days
Army Unit 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Harpies
Griffins
Drakes
Thieves
-
98
-
21
-
98
-
21
-
101
-
21
-
99
-
22
-
98
-
21
-
99
-
21
-
98
-
21
-
99
-
21
-
98
-
21
-
101
-
21
-
98
-
21
-
99
-
21
-
98
-
21
-
99
-
21
-
98
-
21
-
100
-
21
-
98
-
21
-
98
-
21
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

http://u1.swirve.com/council.cgi?elder=100 - Behead this Advisor

into this

Military Intelligence on Sapiens Curse (17:1)
[http://www.utopiatemple.com Angel v1.44 Beta]

Ruler & Race: Sir Sapien, Avian.

Total Attack points: 67,598
Total Defense points: 90,360
** Standing Army (At Home) **
Soldiers: 1,214 (2,428 offense and defense)
Harpies: 727 (2,908 offense points)
Griffins: 16,226 (64,904 defense points)
Drakes: 5,357 (32,142 offense / 21,428 defense)
Total Attack points: 37,478
Total Defense points: 88,760

** Armies #2/#3 (Back in 8:54 hours) **
Harpies: 3,465 (13,860 offense points)
Drakes: 200 (1,200 offense / 800 defense)
Total Attack points: 15,060

** Armies #4/#5 (Back in 8:55 hours) **
Harpies: 3,465 (13,860 offense points)
Drakes: 200 (1,200 offense / 800 defense)
Total Attack points: 15,060

** Troops in Training **
Griffins: 1,777 (7,108 defense points)
Next 12 hours: 98 98 101 99 98 99 98 99 98 101 98 99
Thieves: 379
Next 13 hours: 21 21 21 22 21 21 21 21 21 21 21 21 21

most forums wont copy a table like this one will, but basically that is what I want to do. Ignore all that writing at the top, and just take out the relivent information.



-------------
If you can't do it on your own, your not trying hard enough!


Posted By: fernan82
Date Posted: 09 June 2003 at 5:26pm
i don't think that's possible, unless the "relevant" information is exactly on the same position on every page... you can't have the asp script figure out which info is relevant and which is not... if the page is powered by a database and you can connect and read from it then you can...

-------------
FeRnAN
http://www.danasoft.com/">


Posted By: Sapien
Date Posted: 10 June 2003 at 2:08pm
the relivent information is in the exact spot every page. It NEVER moves.

-------------
If you can't do it on your own, your not trying hard enough!


Posted By: Sapien
Date Posted: 13 June 2003 at 5:29pm

just topping this in the hope's that somebody will be able to tell me where to start looking for this.

I'm think Bruces stie search engine may hold a clue, it searches for certain words on a site. If anyone knows if this is a good place ot start looking post up.



-------------
If you can't do it on your own, your not trying hard enough!


Posted By: dpyers
Date Posted: 16 June 2003 at 12:22am

I'd start with viewing the source on some of those pages. You don't want to copy the contents of all tables on the page, but just certain ones. It's possible that if all pages are the same, the table name is also the same.

Please note that sucking info from another site and representing it as your own is not only low class, but also in violation of copyright laws.

 



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Sapien
Date Posted: 16 June 2003 at 4:23pm

The people this application is for will not be viewing the source code, they will just be copying the page and sending it in.

It's not copyrighted material, and I'm not claiming it as my own work, I'm just re-arranging the text so it's easier to read.



-------------
If you can't do it on your own, your not trying hard enough!


Posted By: fernan82
Date Posted: 16 June 2003 at 4:59pm
http://www.4guysfromrolla.com/webtech/110100-1.shtml - Using Microsoft's XMLHTTP Object To Get Data From Other Web Pages

-------------
FeRnAN
http://www.danasoft.com/">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net