Monday, January 19, 2009

calling external js file from another external js file

First.js

function one()
{
alert('wroked');
var link_new=document.createElement('script');
link_new_script.src="second.js";
document.body.appendChild(link_new_script);
two();
}

second.js
function two()
{
alert('working');
}

No comments: