[thelist] <script> within <script>

Gilles Vincent g_vincent at ixo.fr
Thu Mar 28 09:35:00 CST 2002


Just split the string expression so that the browser will not evaluate it :
<script>
...
 document.write("<scr"+"ipt language='javascript' type='text/javascript'
src='"+ disp + ".js'></scr"+"ipt>");
 </script>


----- Original Message -----
From: "Alderson, Russ" <russ.alderson at Circle.com>
To: <thelist at lists.evolt.org>
Sent: Thursday, March 28, 2002 4:11 PM
Subject: [thelist] <script> within <script>


> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> --
> [ Picked text/plain from multipart/alternative ]
> does anyone know if this is kosher?
> i want the page to load a js file based on a value in the query string
>
> <script>
> tmpArray = new Array();
> var ref = document.location.href;
> tmpArray = ref.split("?");
> var disp = tmpArray[1];
>
> document.write("<script language='javascript' type='text/javascript'
src='"
> + disp + ".js'></script>");
>
> </script>
>
>
> <!--
> russ alderson
> -->
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list