how to read the content from webpage

M

mekalai82

I have the URL for example (http://www.example.com)
from that url have the <div class = "abc"> xxxxx</br><div>
i need to read the content from the URL is xxxxx only....... how to
read the Div tag value from the specific webpage using javascript

Thanks in advance
manimekalai.S
 
B

Bart Van der Donck

I have the URL for example (http://www.example.com)
from that url have the <div class = "abc"> xxxxx</br><div>
i need to read the content from the URL is xxxxx only....... how to
read the Div tag value from the specific webpage using javascript

You might be interested in AJAX Cross Domain:

http://www.ajax-cross-domain.com

ACD.responseText holds the full HTML that was returned, from which the
part inside the <div> can then be extracted using a regular
expression.

Hope this helps,
 
S

SAM

(e-mail address removed) a écrit :
I have the URL for example (http://www.example.com)
from that url have the <div class = "abc"> xxxxx</br><div>

the file called at this url has '<div ... '
i need to read the content from the URL is xxxxx only....... how to
read the Div tag value from the specific webpage using javascript

1) the file must be in the same domain
2) you'll have to load somwhere this file
directly in a tag 'object' or in an iframe
or via Ajax
(Ajax is better to get the content of the called file)
3) from that point you'll de abble to use DOM JS functions to
analyize this loade page to extract the wanted fragment
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top