Hi
I am aware parts of this question have been an issue on this site before but I have tried a script that was posted here before and couldn’t make it work…
i have a page with a small swf-file that should open up a new window with my main site(a flash site) with javascript. It only works in Netscape and Safari, not in Explorer. i am on Mac and I haven’t had achance to test it on PC yet.
Here is the code:
[AS]open_mc.onEnterFrame = function() {
getURL(“javascript:openWindow(‘artsc.html’,’:::ART SCENICK.NU:::’, ‘toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width=700, height=376’, top=0, left=0)”);
delete this.onEnterFrame;
};
[/AS]
and in the html I have:
<SCRIPT LANUGAGE=“javascript”>
<!–
function openWindow(URL, windowName, windowProperties){
newWindow=window.open(URL, windowName, windowProperties);
}
–>
OOPS,
lots disappeared… and of course it chould say: getURL(javascript:openWindow etc
cont.
this is the code in the html document.
<SCRIPT LANUGAGE=“javascript”>
<!–
function openWindow(URL, windowName, windowProperties){
newWindow=window.open(URL, windowName, windowProperties);
}
–>
I don’t seem to understand this forum…
In the html document I just have the regular
function openwindow(URL, windowName, windowProperties) i don’t seem to be able to post it here for some reasonalso I don’t manage to center the new window. I have tried a script from this site but without success…
i would be really grateful for help!!!
OK
I have found (on this forum) and used a script that works really well to center my new window. THANKS Shane Waldeck!!! However, none of this works in IE 5.2 on my Mac. That is, it doesn’t open a window at all. I have tried changing my onEnterFrame to a release button event in the swf and about a million other useless things in the html document. It is a real problem to me since my client is on Mac AND IE… Can anyone point me to a tutorial or help me with this? I hope I make more sense this time.
Here is the new code:
[AS]<SCRIPT LANUGAGE=“javascript”>
<!–
function newWin(page,winName,w,h,scrollb,resize) {
var win=null;
centerWidth = (screen.width) ? (screen.width-w)/2 : 0;
centerHeight = (screen.height) ? (screen.height-h)/2 : 0;
config =
‘height=’+h+’,width=’+w+’,top=’+centerHeight+’,left=’+centerWidth+’,scrollbars=’+scrollb+’,resizable=’+resize+’’
win = window.open(page,winName,config);
}
–>
</SCRIPT>
[/AS]
Or can anyone tell me if or how the calculations above (for the positioning of the new window) can be used in Open Browser Window in DreamweaverMX can be done?:jail:
Creating engaging and entertaining content for designers and developers since 1998.