Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract variables from source code 1

Status
Not open for further replies.

CXgamer

Programmer
Oct 30, 2008
3
BE
Hi,

I'm CX, and I'm a new guy... With a question...
I'm wondering if it's possible to make a javascript-script that can open the source of a webpage from
to

and scan the source code for the following:

<b>Minimum price:</b> 183
</span>
<span class="spaced_span">
<b>Market price:</b> 192
</span>
<span>
<b>Maximum price:</b> 201

and

<div class="subsectionHeader">
Cannonball
</div>

And extract the 183, 192, 201 and Cannonball into variables of an array.
And when these big arrays are done, then I want to give them to flash (since they are friends)...

If you don't have a direct answer to all of this, then post suggestions or parts of answers... If everybody does their best, we can find the answer...
I'm so sorry that I can't do this myself, I master several languages, but my javascript knowledge is just too limited... :(
I hope you can help,

Thank you in advance,

CX
 
Use a server-side script to do this... like PHP. Javascript is not ideal for this kind of problem IMHO.

Cheers,
Jeff

[tt]Visit my blog [!]@[/!] Visit Code Couch [!]@[/!] [/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
And with server-side you mean that I'll have run the script on a server somewhere in internet? :eek:
 
No, you can run it from your own computer if you have a web server running on it. If you want it accessible from the Internet, then the computer has to be accessible by others from the Internet, which most likely means setting it up on "a server somewhere in the Internet".

Lee
 
Ah, I need this script to run one time a day, can I make a web server running on my computer for a short period of time then?

Thank you in advance,

CX
 
Hi

Then there is no reason to use neither server-side or client-side scripting. Just write a CLI application in one of the several languages you master and run it from a scheduler.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top