Loading HTML-page without activating it

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeppe 1971

    Loading HTML-page without activating it

    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
  • Richard Cornford

    #2
    Re: Loading HTML-page without activating it

    "Jeppe 1971" <jeppe1971@jubi imail.dk> wrote in message
    news:bc1b02db.0 312040526.2b844 1a4@posting.goo gle.com...[color=blue]
    >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).[/color]

    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>[color=blue]
    >I need a way to pass the loaded document into a string before
    >it is activated.[/color]

    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.


    Comment

    Working...