Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - formatting text from a webpage
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

formatting text from a webpage

 Post Reply Post Reply Page  12>
Author
Sapien View Drop Down
Newbie
Newbie


Joined: 19 October 2002
Location: Canada
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sapien Quote  Post ReplyReply Direct Link To This Post Topic: formatting text from a webpage
    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.



Edited by Sapien
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Sapien View Drop Down
Newbie
Newbie


Joined: 19 October 2002
Location: Canada
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sapien Quote  Post ReplyReply Direct Link To This Post 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:
Affairs of the State   Civilian Affairs   Military Affairs   Internal Affairs  
Arts & Sciences   Mystic Affairs   Our History   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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

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.

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Sapien View Drop Down
Newbie
Newbie


Joined: 19 October 2002
Location: Canada
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sapien Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2003 at 2:08pm
the relivent information is in the exact spot every page. It NEVER moves.
Back to Top
Sapien View Drop Down
Newbie
Newbie


Joined: 19 October 2002
Location: Canada
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sapien Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Sapien View Drop Down
Newbie
Newbie


Joined: 19 October 2002
Location: Canada
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sapien Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.