March 28, 2024, 07:29:36 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Play Arcade Games in Pop-Up Window

Pages: [1]   Go Down
  Print  
Author Topic: Play Arcade Games in Pop-Up Window  (Read 708 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« on: December 18, 2008, 04:06:16 pm »

Footers:
Code:
<script>
if(location.href.match(/action=arcade/i)){
//Created by Agent Moose (revolutionx.smfforfree3.com)
var Img = document.getElementsByTagName("img");
for(x=0;x<Img.length;x++){
if(Img[x].src.match("/Games/(.*).gif")){
var RawR = RegExp.$1;
$(Img[x]).parent().parent().next().find("div div.smalltext").append(" | <a href='javascript:void(0)' onclick='window.open(\"/Games/" + RawR + ".swf\","PopUPGame",\"width = 600,height = 600,resizable=yes,scrollbars=yes\");'>Play game in a Pop-Up window</a>");
};};};
function PopUPGame(url){
var game = window.open(url,'name','width, height');
if(window.focus) game.focus();
};
</script>

This code adds a link next the the View highscores link when viewing all the games on a page called " Play game in Pop-Up Window".

Enjoy Smiley
Report Spam   Logged


Share on Facebook Share on Twitter

deathwilldie
Administrator
Adminitrator
Offline Offline

Posts: 1,769


View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Level 5
« Reply #1 on: December 18, 2008, 05:15:52 pm »

If you have pop-up you would have to let that page show pop-ups wouldn't you?
Report Spam   Logged

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #2 on: December 19, 2008, 07:31:53 pm »

No.  It opens the game in a new window Smiley
Report Spam   Logged


Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #3 on: June 17, 2009, 06:02:42 am »

If a member has Pop-Up Blocker on will it still open?
Report Spam   Logged






Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #4 on: June 17, 2009, 10:35:54 am »

Honestly, I wouldn't know.  I believe it should though.
Report Spam   Logged


Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
Tenth year Anniversary Linux User Combination
« Reply #5 on: June 17, 2009, 12:48:47 pm »

Some popup blockers block JS popups, it really depends on which blocker you use.
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #6 on: June 17, 2009, 12:55:07 pm »

If a member has Pop-Up Blocker on will it still open?

If you have a pop-up blocker it should at least open in a new tab.
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #7 on: June 19, 2009, 03:06:14 am »

Okaii thanks to know Andrew. I'll add the code now
Report Spam   Logged






Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy