Randy Webb wrote:
Vincent van Beveren wrote:
> I admit that I am a novice when it comes to the HTML DOM and
> JavaScript. Basically, here is what I want to do:
>
> 1. Import some HTML from a remote web site
> 2. Parse the HTML to locate a specific tag based on font weight and
> font size
> 3. Check the text in that tag to see if it matches a specified string
>
> Does anyone have any ideas?
You can't do that in JavaScript because of security restrictions.
In IE and Mozilla, sure I can.
http://jibbering.com/2002/4/httprequest.html
HTTPRequest won't read from a site other then the site the file it is included
on was downloaded from in the default security environment.
In other words, your site can't make a request from
www.yahoo.com with the
HTTPRequest object in the default security environment.
You'll need to use some server-side technology for that.
Depends on the browser actually. And whether it has a JVM installed or
not. And, whether it has javascript enabled or not.
Applets running the sandbox in the default security environment can't access
domains other then the one they are downloaded from, Javascript running in the
default security environment can't make HTTPRequests from domains other then
the one they were downloaded from.
If you have a test site that demonstrates otherwise I'd be interested to see
how you are getting around these security limitations.
--
| Grant Wagner <gw*****@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
*
http://www.mozilla.org/docs/web-deve...upgrade_2.html