[jQuery] Re: Executing Dynamic Javascript

2008-11-20 Thread ricardobeat
Dynamically inserted scripts are only executed when appended to the , I bet it works like this (maybe not): $(document).ready(function(){ vSrc = "external.js"; $("#target").attr("src", vSrc).appendTo('head'); }); On Nov 18, 6:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have

[jQuery] Re: Executing Dynamic Javascript

2008-11-20 Thread Rudy Susanto
You should write the code like below. var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'something.js'; document.getElementById('div1').appendChild(script); [EMAIL PROTECTED] wrote: > I have an issue that I initially thought was

[jQuery] Re: Executing Dynamic Javascript

2008-11-18 Thread Daniel
You can try jQuery.getScript(url, callback) http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback On Nov 19, 4:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have an issue that I initially thought was a jQuery problem, but > after simplifying things in preparation for posting my q