Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    5
    Thanked 0 Times in 0 Posts

    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.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •