By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,598 Members | 1,894 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,598 IT Pros & Developers. It's quick & easy.

Loading HTML-page without activating it

P: n/a
Hi

Does anyone know of a way to load a HTML-page and examine the document
without activating the code?

I am trying to create a search-function in javascript.
The idea is that the function goes through all the HTML-pages on a
site looking for words entered by the user. The results is thereafter
presented to the user (it's a kind of a search-engine).

Creating the search-function is easy. I can do that myself.

The problem is that I can not find a way to load the HTML-pages
without activating them. Whenever a page is loaded into e.g. an
<OBJECT> or <IFRAME> it is activated. And if the body onload-event has
an alert-message, the user will be shown 50 alert-boxes, if there are
50 pages to go through. Not very smart ...

I need a way to pass the loaded document into a string before it is activated.

Best regards,

Jeppe Andersen
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Jeppe 1971" <je*******@jubiimail.dk> wrote in message
news:bc**************************@posting.google.c om...
Does anyone know of a way to load a HTML-page and examine
the document without activating the code?

I am trying to create a search-function in javascript.
The idea is that the function goes through all the
HTML-pages on a site looking for words entered by the user.
The results is thereafter presented to the user (it's a kind
of a search-engine).
What you are proposing is that for _each_and_every_ search request made
the user downloads the entire web site. You have got to be on broadband
(or something better) to even be considering such a ridiculous scheme.

<snip>I need a way to pass the loaded document into a string before
it is activated.


Generally you can't but if you are willing to only impose this nonsense
on the users of a couple of types of web browsers you could look at
XMLHttpRequest and its ActiveX (near) equivalent. You will be able to
find references and examples searching on Google (note: that is a real
search engine and will not make you download the entire world wide web
in order to find out what is on it).

Richard.
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.