OZONE Asylum
Forums
DHTML/Javascript
Modal Popup, needs to close and return user to link/hash
This page's ID:
28068
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
yes yes, duh... Code... *shakes head* This is the page that on exit the popup is called. It's set via an onunloan event. [code] var exit=true; var url="http://www.ultrametabolismbook.com/explain-exit.html"; // FF var ffh=585; var ffw=660; // IE var wh=650; var ww=678; function modalWin() { if (exit) { if (window.showModalDialog) { LeftPosition = (screen.width) ? (screen.width-ww)/2 : 0; TopPosition = (screen.height) ? (screen.height-wh)/2 : 0; sF = "dialogWidth:"+ww+"px;dialogHeight:"+wh+"px;dialogTop:"+TopPosition+";dialogLeft:"+LeftPosition; detWin = window.showModalDialog(url, window, sF); eval(detWin); } else { LeftPosition = (screen.width) ? (screen.width-ffw)/2 : 0; TopPosition = (screen.height) ? (screen.height-ffh)/2 : 0; window.open(url,'exitpopup', 'height='+ffh+',width='+ffw+',top='+TopPosition+',left='+LeftPosition+',toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes'); } } }[/code] The popup contains this JS... [code] function load(url) { if (window.dialogArguments && dialogArguments.location) { dialogArguments.location.hash=url; // url being the hash (#offer) window.close(); } else { window.opener.location.href=url; timer = setTimeout('window.close();', 10); } }[/code] When the link in the body is clicked, it's using an onClick event to pass in the hash it's to jump to. It does, but then the page refreshes back to the top. Thanks Casey / AT [url=http://www.ap0s7le.com]Personal[/url] [url=http://www.apostlesasylum.com]Song Lyrics[/url] [url=http://www.momslilgreentin.com]Family Recipes[/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »