Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > adding a new Script object runtime

Reply
Thread Tools

adding a new Script object runtime

 
 
Lamberti Fabrizio
Guest
Posts: n/a
 
      05-04-2004
Hi all,
I've got this strange problem.

With JScript code like this window.document.scripts I obtain an array with all scripts defined in my html or asp page.

At runtime is it possible adding a new element in this array of scripts ?

If yes how I can do it ?

Thx at all for the help
 
Reply With Quote
 
 
 
 
sharon
Guest
Posts: n/a
 
      05-18-2004
one way to do it:

var script = document.createElement("SCRIPT");
script.src = "myScript.js";
document.body.appendChild(script);

"Lamberti Fabrizio" <> wrote in message news:<c786b4$iuc$>...
> Hi all,
> I've got this strange problem.
>
> With JScript code like this window.document.scripts I obtain an array
> with all scripts defined in my html or asp page.
>
> At runtime is it possible adding a new element in this array of scripts
> ?
>
> If yes how I can do it ?
>
> Thx at all for the help
> --

 
Reply With Quote
 
 
 
 
Jeff Thies
Guest
Posts: n/a
 
      05-18-2004

"sharon" <> wrote in message
news: om...
> one way to do it:
>
> var script = document.createElement("SCRIPT");
> script.src = "myScript.js";
> document.body.appendChild(script);



Does that work in NS7 or Opera? I seem to recall that NS6 had troubles with
this.

Jeff

>
> "Lamberti Fabrizio" <> wrote in message

news:<c786b4$iuc$>...
> > Hi all,
> > I've got this strange problem.
> >
> > With JScript code like this window.document.scripts I obtain an array
> > with all scripts defined in my html or asp page.
> >
> > At runtime is it possible adding a new element in this array of scripts
> > ?
> >
> > If yes how I can do it ?
> >
> > Thx at all for the help
> > --



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating and adding new methods in runtime konryd Ruby 2 05-11-2007 05:08 PM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
Re: Adding new methods at runtime to a class =?iso-8859-1?Q?Fran=E7ois?= Pinard Python 2 11-25-2003 11:45 AM
RE: Adding new methods at runtime to a class Delaney, Timothy C (Timothy) Python 5 11-25-2003 02:26 AM
Adding new methods at runtime to a class Fernando Rodriguez Python 1 11-24-2003 09:54 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57