vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   ibProArcade Archive (https://vborg.vbsupport.ru/forumdisplay.php?f=174)
-   -   How do I get a popup window to work in the 'Game Objective'? (https://vborg.vbsupport.ru/showthread.php?t=184129)

jdelasko 07-02-2008 02:25 AM

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.

theque 01-16-2009 01:14 PM

how did you get this to work ? and did you do it with the v3 skin thats what im trying to do also cheers

Gemma 01-16-2009 03:06 PM

Quote:

Originally Posted by theque (Post 1714649)
how did you get this to work ? and did you do it with the v3 skin thats what im trying to do also cheers

https://vborg.vbsupport.ru/showthread.php?t=155835


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
  • Page Generation 0.02611 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete