Click here to Skip to main content

Web Development

 
AnswerRe: GMail SMTP Outgoing Problem PinprofessionalBernhard Hiller26-Apr-13 1:36 
GeneralRe: GMail SMTP Outgoing Problem PinmemberIshaan Karnik30-Apr-13 4:09 
AnswerRe: GMail SMTP Outgoing Problem PinmvpRichard MacCutchan30-Apr-13 7:29 
QuestionGetting Error while transferring records from one database to other using web application [modified] PinmemberParag Raibagkar22-Apr-13 21:13 
AnswerRe: Getting Error while transferring records from one database to other using web application PinmvpSandeep Mewara22-Apr-13 23:43 
QuestionDisplaying data in chart with import csv file to database sql PinmemberDhimas Yuli PW22-Apr-13 17:34 
AnswerRe: Displaying data in chart with import csv file to database sql PinmemberJasmine250123-Apr-13 9:18 
QuestionHelp trying to set a 12 hour cookie for a DHTML popup PinmemberMember 1000506922-Apr-13 6:36 
Basically I need this DHTML popup to show once per 12 hours for the visiting user. I can't seem to figure it out...
 
This is in the <head> code for the pop:
 
<script type="text/javascript">
var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
 
function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
 
function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}
 
function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)
 
dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}
 
function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="30px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
document.getElementById("cframe").src=url
}
}
 
function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","<TMPL_VAR site_url>/images/restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","<TMPL_VAR site_url>/images/max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}
 
function closeit(){
document.getElementById("dwindow").style.display="none"
}
 
function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}
 
</script>
 
 
and this in the main body of the page
 
<SCRIPT LANGUAGE="JavaScript">
if (window != top) top.location.href = location.href;
</SCRIPT>
<div id="dwindow" style="position:absolute;background-color:#EBEBEB;cursor:hand;left:0px;top:0px;display:none" onMousedown="initializedrag(event)" onMouseup="stopdrag()" onSelectStart="return false">
<div align="right" style="background-color:navy"><font size="1" color="white">Loading ad....Please wait a few seconds or close the ad....</font><img src="<TMPL_VAR site_url>/images/close.gif" id="page_effect" onClick="closeit()"></div>
<div id="dwindowcontent" style="height:100%">
<iframe id="cframe" src="" width="100%" height="100%"></iframe>
</div>
</div>
<script>
 
if (ns6) window.onload=new Function('loadwindow("http://AdURLhere.com",900,900)')
else
loadwindow("http://AdURLhere.com",900,900)
</script>
<script type="text/javascript">
 
$(document).ready(function(){
 
	$('#page_effect').fadeIn(80000);
 
});
 
</script>
 
Any help would be appreciated. thanks
QuestionCheckbox check should automatically and slowly fadeout to unchecked PinmemberMember 937599314-Apr-13 8:57 
AnswerRe: Checkbox check should automatically and slowly fadeout to unchecked PinmemberMartin-FFB15-Apr-13 0:32 
AnswerRe: Checkbox check should automatically and slowly fadeout to unchecked PinmemberJasmine250122-Apr-13 12:11 
QuestionWebsite conversion PinmemberOnose13-Apr-13 5:27 
AnswerRe: Website conversion PinmemberMartin-FFB15-Apr-13 0:35 
QuestionHelp with project. JavaScript • CSS • SVG • HTML Pinmembermamouch32013-Apr-13 3:36 
QuestionRails Facebook Login Plug-in keeps timing out PinmemberSimonHerd13-Apr-13 1:48 
Questionhide printer dialog box in javascript PinmemberSumairaR11-Apr-13 2:03 
AnswerRe: hide printer dialog box in javascript Pinmemberdusty_dex11-Apr-13 3:22 
AnswerRe: hide printer dialog box in javascript Pinmembermic2114-May-13 2:38 
Questionlynda.com php-with-mysql-essential-training problem PinmemberTanveer Jony11-Apr-13 1:14 
AnswerRe: lynda.com php-with-mysql-essential-training problem PinmvpRichard MacCutchan11-Apr-13 1:54 
AnswerRe: lynda.com php-with-mysql-essential-training problem Pinmemberenhzflep12-Apr-13 1:39 
QuestionPHP Form fails ... Pinmembercrob0910-Apr-13 15:40 
QuestionStrange one [modified] PinmemberJohn Simmons / outlaw programmer10-Apr-13 14:11 
AnswerRe: Strange one Pinmemberdusty_dex11-Apr-13 1:59 
GeneralRe: Strange one PinmemberJohn Simmons / outlaw programmer11-Apr-13 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 29 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid