NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Need Help With JS Code

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
6 members in live chat ~  


Reply
 
LinkBack Thread Tools
Old 08-23-2011, 05:54 AM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Jul 2004
Posts: 588
resellerlogic is a jewel in the roughresellerlogic is a jewel in the roughresellerlogic is a jewel in the rough
 



Need Help With JS Code


I'm looking to create a custom splash page. aka full page ad/interstitial

Example of the page I'm trying to create can be find by visiting this site.

http://imgchili.com/show/396/396314_691404701.jpg

Notice how it was the Continue to Image link when you click it. I'm looking for a way to do that. Spent hours searching google and no luck.

Any help is appreciated.
resellerlogic is offline   Reply With Quote
Old 08-23-2011, 09:55 AM   #2 (permalink)
Senior Member
 
defaultuser's Avatar
Join Date: May 2009
Location: internet@ctivist.com
Posts: 4,790
defaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatness
 



Not How I would do it.....

Basically they have an image that scales to the whole window which is viewable and the actual page is hidden in a div.

Once you click the text (not a true link) - it hides the image and the text and makes the invisible div (the actual page) visible.
__________________
A Member of: IdeationTeam.com
HowToBeADomainer.com - a Domaining How To
AuthorEditor.com
defaultuser is online now   Reply With Quote
Old 08-23-2011, 03:37 PM   #3 (permalink)
New Member
 
Winleet's Avatar
Join Date: Aug 2011
Posts: 14
Winleet is an unknown quantity at this point
 



Yep, they just use .htaccess mod_rewrite so it shows that page first.
Winleet is offline   Reply With Quote
Old 08-23-2011, 05:28 PM THREAD STARTER               #4 (permalink)
NamePros Regular
Join Date: Jul 2004
Posts: 588
resellerlogic is a jewel in the roughresellerlogic is a jewel in the roughresellerlogic is a jewel in the rough
 



How would you go about doing that?
resellerlogic is offline   Reply With Quote
Old 08-23-2011, 07:12 PM   #5 (permalink)
Senior Member
 
defaultuser's Avatar
Join Date: May 2009
Location: internet@ctivist.com
Posts: 4,790
defaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatness
 



They have most of their logic here:

http://imgchili.com/js/showa.js
????: NamePros.com http://www.namepros.com/programming/728119-need-help-with-javascript-code.html
Quote:
setInterval(function() {
$("a.continue").fadeIn(400);
}, 2000 );

$("div#all").hide();

$("html body").css("background","none");

$("div#ad").show();
__________________
A Member of: IdeationTeam.com
HowToBeADomainer.com - a Domaining How To
AuthorEditor.com
defaultuser is online now   Reply With Quote
Old 08-23-2011, 08:36 PM THREAD STARTER               #6 (permalink)
NamePros Regular
Join Date: Jul 2004
Posts: 588
resellerlogic is a jewel in the roughresellerlogic is a jewel in the roughresellerlogic is a jewel in the rough
 



I saw that. I'm just not sure how I would apply that into a .htaccess
resellerlogic is offline   Reply With Quote
Old 08-23-2011, 10:24 PM   #7 (permalink)
Senior Member
 
defaultuser's Avatar
Join Date: May 2009
Location: internet@ctivist.com
Posts: 4,790
defaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatness
 



It really depends on exactly what you want to do.

You want a splash page all the time?
Only on the first visit?
Only on the first visit per page?
Only if the visit is to the site directly?

If the link is used as an IMG src should it render the JPG ?

I would tend to use .htaccess to convert the request into a specific php page and do it all there with PHP and ignore the javascript - use a real link.

I'd use the following technique.

http://stackoverflow.com/questions/2...get-parameters
__________________
A Member of: IdeationTeam.com
HowToBeADomainer.com - a Domaining How To
AuthorEditor.com
defaultuser is online now   Reply With Quote
Old 08-24-2011, 07:08 AM THREAD STARTER               #8 (permalink)
NamePros Regular
Join Date: Jul 2004
Posts: 588
resellerlogic is a jewel in the roughresellerlogic is a jewel in the roughresellerlogic is a jewel in the rough
 



What I basically need it to do is display that splash page on the first visit per page. or once per 24 hours.

Unfortunately that link you sent me doesn't help me much since I'm not familiar with what to do at all.
Last edited by resellerlogic; 08-24-2011 at 07:17 AM.
resellerlogic is offline   Reply With Quote
Old 08-25-2011, 02:44 AM THREAD STARTER               #9 (permalink)
NamePros Regular
Join Date: Jul 2004
Posts: 588
resellerlogic is a jewel in the roughresellerlogic is a jewel in the roughresellerlogic is a jewel in the rough
 



I'll pay $15 via PP or AP if anyone can get this designed and to me within 24 hours.

Need a replica or something similar.

http://imagetwist.com/ayajynidpn3o/691404701.jpg.html

something like that one would be excellent as well.
resellerlogic is offline   Reply With Quote
Old 08-25-2011, 08:03 AM   #10 (permalink)
Senior Member
 
defaultuser's Avatar
Join Date: May 2009
Location: internet@ctivist.com
Posts: 4,790
defaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatness
 



Code:
<!DOCTYPE html popUpBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Title Page</title>
<META http-equiv=Content-Type content="text-html; charset=UTF-8">
</head>
<body>
<!--The Popup Box Layout Start -->
<style>
.popupOverlay {
    position:absolute;    background-color:#000000;
    display:none;	height:300%;
    left:0;  top:0;
    width:100%;  z-index:6;
}
</style>

<div class="popupOverlay" id="popupOverlay" style="display: none; opacity: 0.9; filter:alpha(opacity=90); -moz-opacity:0.9;">
<div style="border: 5px solid #ccc; padding: 20px; z-index: 1000; position: relative; margin:200px auto;display: none; font-size: 18px; width: 300px; height: 130px; text-align: center;opacity: 1; filter:alpha(opacity=100); -moz-opacity:1;background-color: white;" id="popupBox">
<br/>Press Button to Continue<br/>
<a style="font-size: 24px; padding-left: 10px; padding-right: 10px;" class="buttonblue" href="javascript:doClose();">ENTER</a><br/>
<a style="font-size: 12px;" href="JavaScript:location.replace('http://www.fark.com');">fark off</a><br/>
</div>
</div>
<!--The Popup Box Layout End -->

<!--The Popup Box Javascript to show Begin -->
<script>
var showPopup = true;
//If Cookie is set then don't show - remove this line if you always want and just leave at true
if (getCookie("popupOverlay") != null)
{
	showPopup = false;
}

var popupOverlay=document.getElementById("popupOverlay");
var popupBox=document.getElementById("popupBox");

if(showPopup==true){
    popupBox.style.display="block";
    popupOverlay.style.display="block";
   
}

function doClose(){
    popupBox.style.display="none";
    popupOverlay.style.display="none";
    var exp = new Date();    
    exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24));
    setCookie('popupOverlay','1', exp);
}

function setCookie(name, value, expires) {
  document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString());
}

function getCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg) {
	
       return getCookieVal (j);
      }
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
    }
  return null;
  }
</script>

<!--The Popup Box Javascript to show End -->
<!--Your Normal Page-->

HELLO WORLD!!!<BR />
I am here but hidden until accepted
</body>
</html>

????: NamePros.com http://www.namepros.com/showthread.php?t=728119
????: NamePros.com http://www.namepros.com/showthread.php?t=728119
This is the last example

Shows a Box with a Press Button to continue. It will ONLY show if the Cookie is not set. If you hit CONTINUE then it sets a cookie and you won't be prompted again.

Remove the "getCookie" line and it will show ALWAYS - even if you reload.

The style is "borrowed" from the last example you show If you have lots of other Javascript going on then you may need to put this in a function and call it from the "window.onload = " piece.

You can change the "Fark off" option
__________________
A Member of: IdeationTeam.com
HowToBeADomainer.com - a Domaining How To
AuthorEditor.com
Last edited by defaultuser; 08-25-2011 at 08:14 AM.
defaultuser is online now   Reply With Quote
Old 09-18-2011, 12:43 AM   #11 (permalink)
New Member
Join Date: Dec 2010
Posts: 12
Roos is an unknown quantity at this point
 



I advise not to do that. It enoys to always get popups with ads on websites.
__________________
Real Estate Spain
Roos is offline   Reply With Quote
Old 10-08-2011, 03:24 PM THREAD STARTER               #12 (permalink)
NamePros Regular
Join Date: Jul 2004
Posts: 588
resellerlogic is a jewel in the roughresellerlogic is a jewel in the roughresellerlogic is a jewel in the rough
 



Is there anyway to when you click enter open a new window as well as closing it? Seems to be what they do and many other sites.
__________________
Earn up to $2.20 Per 1000 Image Views at http://www.imagepad.us
resellerlogic is offline   Reply With Quote
Old 10-08-2011, 03:36 PM   #13 (permalink)
Senior Member
 
defaultuser's Avatar
Join Date: May 2009
Location: internet@ctivist.com
Posts: 4,790
defaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatnessdefaultuser Has achieved greatness
 



Originally Posted by resellerlogic View Post
Is there anyway to when you click enter open a new window as well as closing it? Seems to be what they do and many other sites.
I didn't get my $15 PP last time round, lol ;-)
????: NamePros.com http://www.namepros.com/showthread.php?t=728119









I'm kidding.
__________________
A Member of: IdeationTeam.com
HowToBeADomainer.com - a Domaining How To
AuthorEditor.com
defaultuser is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Empire Technolgy 50% off in stock deicated Servers 50% off VPS Servers Lowesthost Web Hosting Offers 1 08-20-2011 02:52 AM
TuningTube social network, included brand new Image Gallery and Forum, ORIGINAL CODE! flash_back Domains For Sale - Auctions 4 05-21-2011 12:50 PM
Help with C# code Ik Programming 0 05-11-2011 09:48 AM
invitation code TNX.net and 1000 free backlinks Boer94 Link Exchange Requests 0 08-31-2008 02:08 AM

 
All times are GMT -7. The time now is 02:49 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger