Firefox Problem for dynamic adding script
Posted: Thu Aug 21, 2008 11:43 pm
Hi,
i am working in a drag and drop application where i need to add drag and drop function dynamically so i am mixing ajax and get ajax result as jquery function then i attach these function to header. Its work fine in IE but its not work in firefox.
here is javascript.
as "xmlHttp.responseText" is ajax response in shape of jquery function.
i also use javascript file but the result is same its not work in firefox.
script for file is
Any help that its work in firefox too?
Thanks
i am working in a drag and drop application where i need to add drag and drop function dynamically so i am mixing ajax and get ajax result as jquery function then i attach these function to header. Its work fine in IE but its not work in firefox.
here is javascript.
Code: Select all
var ss = document.createElement('script');
var scr = xmlHttp.responseText;
//ss.text = scr;
ss.setAttribute('text',scr);
var hh = document.getElementsByTagName('head')[0];
hh.appendChild(ss);i also use javascript file but the result is same its not work in firefox.
script for file is
Code: Select all
var headID = document.getElementsByTagName("head")[0];
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.src = 'http://localhost/test/ajax/jquery_methods.js';
headID.appendChild(newScript);Thanks