J
Jim Adamson
Hi
I want to defer the call of an external .js file so that when the link
in the page is clicked, the .js file is downloaded and
included in the page. The link would also pass on some arguments to
the function in the page. Once the .js file is successfully
downloaded/included, I would then like to pass on the arguments from
this function to the function
that is within the .js file and call the function that's inside the
..js file from the function in the page. Is this possible ? Here's the
sort of thing that I've tried but I get "Is not defined errors"
presumably because the function in the .js file hasn't been
incorporated into the page after clicking the link.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function dload(id,name,street)
document.write('<script src="whatever.js"><\/script>');
jsfunction(id,name,street)
</SCRIPT>
</head>
<body>
<a href="javascript:dload('12345','john','Westwood St');">Link</a>
</body>
</html>
thanks
Jim
I want to defer the call of an external .js file so that when the link
in the page is clicked, the .js file is downloaded and
included in the page. The link would also pass on some arguments to
the function in the page. Once the .js file is successfully
downloaded/included, I would then like to pass on the arguments from
this function to the function
that is within the .js file and call the function that's inside the
..js file from the function in the page. Is this possible ? Here's the
sort of thing that I've tried but I get "Is not defined errors"
presumably because the function in the .js file hasn't been
incorporated into the page after clicking the link.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function dload(id,name,street)
document.write('<script src="whatever.js"><\/script>');
jsfunction(id,name,street)
</SCRIPT>
</head>
<body>
<a href="javascript:dload('12345','john','Westwood St');">Link</a>
</body>
</html>
thanks
Jim