-
hi i am trying to do a popup from a button on the page, and its not working
i have tried with loads of different popup codes gathered from the net and none of them work -
this is my current one:
i have this in the head tags of the html page:
<SCRIPT LANGUAGE="JavaScript">
<!--
function NewWindow(url, windowName, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl +' --
-- ,scrollbars='+scroll+',resizable';
win = window.open(url, windowName, winprops);
if (parseInt(navigator.appVersion) >= 4) {
win.window.focus();
}
}
// -->
</SCRIPT>
and then in flash, i make a button press ctrl+alt+a click on get url and put this code in:
on (release) {
getURL("javascript:NewWindow('http://www.flashpro.nl','name','400','400','yes')");
}
when i export and test it, nothing happens when i click the link
can anyone help ?
-
GAME ON!!!!
Just use this generator:
http://www.flash-db.com/PopUp/
Fill out what ever you need in the fileds. Then paste the code into the get url of the button. Don't worry about any of the HTMl stuff.
-
thats great, thanks
-
thats what ive been trying to use, but for some reason i get two windows????
How do i change it for MX?
-
I tried using this code from the generator and it worked in Netscape 4 and IE 5, but it didn't work in IE 4.5. Does that make sense?
-
Senior Member
Originally posted by wastethebunny
hi i am trying to do a popup from a button on the page, and its not working
i have tried with loads of different popup codes gathered from the net and none of them work -
this is my current one:
i have this in the head tags of the html page:
<SCRIPT LANGUAGE="JavaScript">
<!--
function NewWindow(url, windowName, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl +' --
-- ,scrollbars='+scroll+',resizable';
win = window.open(url, windowName, winprops);
if (parseInt(navigator.appVersion) >= 4) {
win.window.focus();
}
}
// -->
</SCRIPT>
and then in flash, i make a button press ctrl+alt+a click on get url and put this code in:
on (release) {
getURL("javascript:NewWindow('http://www.flashpro.nl','name','400','400','yes')");
}
when i export and test it, nothing happens when i click the link
can anyone help ?
what are the -- bits in the code for?
if I delete those from the function and then test it, the window opens fine in IE 5.5 and netscape 4.7.
-
ah, yeah, in the original code there were also some -- in the link part of the code
its working now anyway
cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|