2 Replies Latest reply on May 19, 2006 9:25 AM by ryanc44

    Calling javascript function from dynamic text file

    ryanc44
      This is probably a fairly easy problem, but it seems to be baffling me. I have a javascript function that's just opens a new window, writes a little bit of html, and grabs an image to place in the window. The javascript is on the page that my flash .swf is embedded in. It looks like this:

      <script type="text/JavaScript">
      <!--
      function newWindowLand(picWinLand) {
      bigpicWindowLand = window.open('', 'picWinLand', 'height=500,width=660,scrollbars=no,status=yes,resizeable=no')
      bigpicWindowLand.document.write("<html><head><title>test image window</title><body bgcolor=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><center><img src="+picWinLand+" height=480 width=640 border=0></html>")
      bigpicWindowLand.document.close()
      bigpicWindowLand.focus()
      }
      //-->
      </script>

      I had this link in my html page:

      <a href="javascript:;newWindowLand('static_images/news/test_image.jpg')">test link</a>

      and it works fine. I then pasted this link into my dynamic text file that loads into my .swf, and nothing happens. I see the "test link" text and it appears to be clickable, but when clicked on I get nothing. Am I missing something really obvious here? TIA...