[Javascript] Disabling javascript prgrammatically for asingle page

dev at qroute.net dev at qroute.net
Wed Jul 7 16:42:18 CDT 2004


Smart suggestion.
Same thing should apply to all onUnload, onLoad, onClick etc.
That does it.

----- Original Message ----- 
From: "Mike Dougherty" <mdougherty at pbp.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Wednesday, July 07, 2004 12:36 PM
Subject: Re: [Javascript] Disabling javascript prgrammatically for asingle
page


before you response.write their code, replace "<script" with "<!--" and
"/script>" with "-->"
to basically turn all their script into HTML comments.

Even slicker would be to use a regexp match on "<script" and "/script>" to
kill everything in
between - but i'm not that slick...

On Wed, 7 Jul 2004 11:43:41 -0700
  <dev at qroute.net> wrote:
>Is it possible to disable the javascript temporarily and programmatically
>using some browser directive ?
>
>I am using the xmlhttp to read html source of the external sites and doing
>some processing on their html structire for my own study sake.
>
>But they got some js code injected in their htmll so when I di
>response.write of thier code, that js code kicks their home page instead
>of staying on my asp page. So I have to do a response.write something to
>an effect that currently showing page will not run any js code.
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list