all groups > flash actionscript > october 2005 >
You're in the

flash actionscript

group:

Why doesnt this javascript work?


Why doesnt this javascript work? PTrice
10/19/2005 10:18:51 PM
flash actionscript:
How do I pop-up gloss.html in a new window that is 800x400. This does not work:

Re: Why doesnt this javascript work? PTrice
10/20/2005 12:13:02 AM
Without the "blank" parameter it redirects my currently browser session to just
the javascript command (which is a blank white page.) Then it does sucessfully
pop-up gloss.htm in a 800x400 window.

With the "_blank" parameter included, when I press my button the browser
flashes white briefly, but nothing happens. No windows open, nothing is
redirected.
Re: Why doesnt this javascript work? John Doe
10/20/2005 1:49:24 AM
[quoted text, click to view]

try deleting the "_blank" parameter

if you keep having problems, explains what "This does not work" means:
Re: Why doesnt this javascript work? Astonished Man
10/20/2005 2:06:54 AM
Try this on your button:

on (release) {

getURL("javascript:openNewWindow('gloss.html','mywindow','height=400,width=800'
)");
}

Then between the <head></head> tag in the html page that contains the flash
movie put the following code:

<script language="javascript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

</script>

This works for me.
Re: Why doesnt this javascript work? Rascule
10/20/2005 7:42:44 AM
Hello

Whith this code you dont need to add javascript to html page:

on (release) {
getURL
("javascript:NewWindow=window.open('http://www.url.com','newWin','width=400,heig
ht=300,left=0,top=0,toolbar=0,location=0,scrollbars=0,status=0,resizable=0,fulls
creen=0'); NewWindow.focus(); void(0);");
}

http://www.flash-db.com/PopUp/
Re: Why doesnt this javascript work? chrishathway
10/20/2005 11:23:31 AM
I'm getting the same error [screen flash and no window] with this code also, It
has sometihng to do with my movie being in action script 2, if i switch back to
1 - its fine. Unfortunately my movie is in 2.
Re: Why doesnt this javascript work? Astonished Man
10/20/2005 1:17:52 PM
Re: Why doesnt this javascript work? ro1960
12/5/2005 11:19:33 PM
AddThis Social Bookmark Button