View Full Version : dynamically loading external SSI

04-15-2005, 11:12 PM
Hi I am trying to do two things at once, when clicking on a link, the visitor is sent to the link and some external SSI script is executed.

the following code works
<script type="text/javascript">
function open_win()
<a onclick="open_win()" target="_new1" href="http://google.com">ab.htm</a>
wrt.asp is some server-sided script which has a
<script type="text/javascript">window.close();</script> placed at the bottom of the code so the page closes immediately after it executes.

I would like to call the external script without hving to use any window.open script
I have tried the folowing code,
<script type="text/javascript">
function staticLoadScript()
{document.write('<script src="wrt.asp" type="text/JavaScript"><\/script>');}
<a onclick="staticLoadScript()" target="_new1" href="http://google.com">ab.htm</a>
</body> Although the ssi executes, the link to google does not open.

Any other ideas?