...

View Full Version : dynamically loading external SSI



javanew
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
<html><head>
<script type="text/javascript">
function open_win()
{window.open("wrt.asp")}
</script></head>
<body>
<a onclick="open_win()" target="_new1" href="http://google.com">ab.htm</a>
</body></html>
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>');}
</script><body>
<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?

thanks,

David



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum