Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-15-2005, 10:12 PM   PM User | #1
javanew
New to the CF scene

 
Join Date: Apr 2005
Posts: 8
Thanks: 5
Thanked 0 Times in 0 Posts
javanew is an unknown quantity at this point
dynamically loading external SSI

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
Code:
<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
Code:
<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,
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

Last edited by javanew; 04-15-2005 at 10:16 PM..
javanew is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:48 PM.


Advertisement
Log in to turn off these ads.