![]() |
How do I get a popup window to work in the 'Game Objective'?
I'd like to be able to add a button to the 'Game Objective' that pops up a window. I added the script below to the skin_arcade.php file but it doesn't work. Where can I add this script so that the popup function works?
===========Below is the javascript============== <SCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- var popupWindow=null; function popup(mypage,myname,w,h,pos,infocus){ if (pos == 'random') {LeftPosition=(screen.width)?Math.floor(Math.rando m()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;} else {LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,location=yes,directories=yes,stat us=no,menubar=no,toolbar=no,resizable=no';popupWin dow=window.open('',myname,settings); if(infocus=='front'){popupWindow.focus();popupWind ow.location=mypage;} if(infocus=='back'){popupWindow.blur();popupWindow .location=mypage;popupWindow.blur();} } // --> </script> ============Below is the code for the button=========== <input style="font-size:10px;color:#9999ff;font-family:verdana;background-color:#222829;" type="button" name="B1" value="More Info" onClick="popup('http://www.majorleaguetalk.com/forums/arcade/gamedata/pinchhitter2.html','Pinch Hitter 2 Help','640','480','center','front');"> As you can see from the link below, the button appears in the game objective box, but a page error occurs becausae the function is apparently not available. I'd like to use this popup funtion to display things such as detailed game information or to display a specific game thread in the forums to encourage game players to post comments about the various games. http://www.majorleaguetalk.com/forum...lay&gameid=295 --------------- Added [DATE]1214973910[/DATE] at [TIME]1214973910[/TIME] --------------- Update: OK, it all works with Firefox and Opera but not with internet explorer. Strange. --------------- Added [DATE]1214986701[/DATE] at [TIME]1214986701[/TIME] --------------- OK.... figured out a different way to do it that works with all browsers. |
how did you get this to work ? and did you do it with the v3 skin thats what im trying to do also cheers
|
Quote:
|
All times are GMT. The time now is 02:58 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|