Click here to Skip to main content
12,395,378 members (55,230 online)

Web Development

 
AnswerRe: GMail SMTP Outgoing Problem Pin
Bernhard Hiller26-Apr-13 0:36
professionalBernhard Hiller26-Apr-13 0:36 
GeneralRe: GMail SMTP Outgoing Problem Pin
Ishaan Karnik30-Apr-13 3:09
memberIshaan Karnik30-Apr-13 3:09 
AnswerRe: GMail SMTP Outgoing Problem Pin
Richard MacCutchan30-Apr-13 6:29
mvpRichard MacCutchan30-Apr-13 6:29 
QuestionGetting Error while transferring records from one database to other using web application Pin
Parag Raibagkar22-Apr-13 20:13
memberParag Raibagkar22-Apr-13 20:13 
AnswerRe: Getting Error while transferring records from one database to other using web application Pin
Sandeep Mewara22-Apr-13 22:43
mvpSandeep Mewara22-Apr-13 22:43 
QuestionDisplaying data in chart with import csv file to database sql Pin
Dhimas Yuli PW22-Apr-13 16:34
memberDhimas Yuli PW22-Apr-13 16:34 
AnswerRe: Displaying data in chart with import csv file to database sql Pin
Jasmine250123-Apr-13 8:18
memberJasmine250123-Apr-13 8:18 
QuestionHelp trying to set a 12 hour cookie for a DHTML popup Pin
Member 1000506922-Apr-13 5:36
memberMember 1000506922-Apr-13 5: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 Pin
Member 937599314-Apr-13 7:57
memberMember 937599314-Apr-13 7:57 
AnswerRe: Checkbox check should automatically and slowly fadeout to unchecked Pin
Martin-FFB14-Apr-13 23:32
memberMartin-FFB14-Apr-13 23:32 
AnswerRe: Checkbox check should automatically and slowly fadeout to unchecked Pin
Jasmine250122-Apr-13 11:11
memberJasmine250122-Apr-13 11:11 
QuestionWebsite conversion Pin
Onose13-Apr-13 4:27
memberOnose13-Apr-13 4:27 
AnswerRe: Website conversion Pin
Martin-FFB14-Apr-13 23:35
memberMartin-FFB14-Apr-13 23:35 
QuestionHelp with project. JavaScript • CSS • SVG • HTML Pin
mamouch32013-Apr-13 2:36
membermamouch32013-Apr-13 2:36 
QuestionRails Facebook Login Plug-in keeps timing out Pin
SimonHerd13-Apr-13 0:48
memberSimonHerd13-Apr-13 0:48 
Questionhide printer dialog box in javascript Pin
SumairaR11-Apr-13 1:03
memberSumairaR11-Apr-13 1:03 
AnswerRe: hide printer dialog box in javascript Pin
dusty_dex11-Apr-13 2:22
memberdusty_dex11-Apr-13 2:22 
AnswerRe: hide printer dialog box in javascript Pin
mic2114-May-13 1:38
membermic2114-May-13 1:38 
Questionlynda.com php-with-mysql-essential-training problem Pin
Tanveer Jony11-Apr-13 0:14
memberTanveer Jony11-Apr-13 0:14 
AnswerRe: lynda.com php-with-mysql-essential-training problem Pin
Richard MacCutchan11-Apr-13 0:54
mvpRichard MacCutchan11-Apr-13 0:54 
AnswerRe: lynda.com php-with-mysql-essential-training problem Pin
enhzflep12-Apr-13 0:39
memberenhzflep12-Apr-13 0:39 
QuestionPHP Form fails ... Pin
crob0910-Apr-13 14:40
membercrob0910-Apr-13 14:40 
QuestionStrange one Pin
John Simmons / outlaw programmer10-Apr-13 13:11
memberJohn Simmons / outlaw programmer10-Apr-13 13:11 
AnswerRe: Strange one Pin
dusty_dex11-Apr-13 0:59
memberdusty_dex11-Apr-13 0:59 
GeneralRe: Strange one Pin
John Simmons / outlaw programmer11-Apr-13 3:46
memberJohn Simmons / outlaw programmer11-Apr-13 3:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web02 | 2.8.160721.1 | Last Updated 22 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid