Forum Moderators: open

Message Too Old, No Replies

Using Javascript Links for entire movie

followup to previous (old) question

         

too much information

4:38 am on Apr 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a followup to [webmasterworld.com...]

Has anyone used a javascript link to open a new window? I keep getting javascript errors when I try to open a new window so I thought I'd be smart and add it to my flash movie instead, but I'm getting the same error.

Here's my actionscript code:

on (release) {
var LINK;
getURL("javascript:window.open('"+LINK+"','Order Form','resizable=no,scrollbars=yes,toolbar=no,status=no,location=no,width=800,height=500');");
}

The LINK is fed dynamically into the flash movie and that seems to be working, but the error I get (Using flash or not) is:

"Invalid Arguement"

This is frustrating because I only get the error on a Windows machine, never on a mac. Firefox and IE6 both give me the error, but Safari and Firefox for the Mac both work fine.

Any ideas?

BlobFisk

11:54 am on Apr 25, 2006 (gmt 0)

too much information

2:51 pm on Apr 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, yes and no. It helped me understand how to use javascript with flash a little better, but I'm still getting the same error.

Maybe my problem is the Javascript itself.

BlobFisk

3:36 pm on Apr 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah, ok!

I don't think that you need the +'s around LINK do you? I have a feeling that this may be the source of your troubles.

too much information

3:41 pm on Apr 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, I solved the problem. It's ugly, but it works.

I had to change all of my links to <a href="something.php?resize=yes" target="WindowName" onClick="newwindow('something.php')">

That makes the Windows browsers work with no errors and still allows the Mac browsers to get the correct javascript method.

I hate that I have to create extra code for some browsers, but the window.open method just didn't work for me. I thought that using Flash would help to skip the problems that Windows was throwing me, but it ended up being a Javascript problem.

Thanks for the help.

BlobFisk

3:46 pm on Apr 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Very strange!

Glad you got it working though!