Topic: Modal Popup, needs to close and return user to link/hash (Page 1 of 1) |
|
|---|---|
|
Bipolar (III) Inmate From: Gainesboro, TN, USA |
posted 06-13-2006 01:17
Hello all, it's a wonder I haven't killed myself today |
|
Paranoid (IV) Inmate From: London |
posted 06-13-2006 11:36
How have you linked to your anchor point? code: <a href="#content"> but if you put something in like this... code: <a href="myPage.html#content"> Then it may well reload the page. That's all I can think of for now. |
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 06-14-2006 18:32
what happens if you don't assign the location? |
|
Bipolar (III) Inmate From: Gainesboro, TN, USA |
posted 06-14-2006 18:54
yes yes, duh... Code... *shakes head* 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: 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);
}
}
|
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 06-14-2006 19:07
huh? |
|
Bipolar (III) Inmate From: Gainesboro, TN, USA |
posted 06-15-2006 18:12
I tried that, still jumps down to the hash and then back to the top. It's crazy. |
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 06-16-2006 10:03
sorry, I'm not at a machine I can play with right now - what happens if you do a windows.settimeout ( setnewlocation,1) after the dialog returned? |
|
Bipolar (III) Inmate From: Gainesboro, TN, USA |
posted 06-16-2006 19:21
Ok, tried that just now and it still refreshes to the top. |
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 06-17-2006 16:18
tell me - does it refresh if you don't set the location? |
|
Bipolar (III) Inmate From: Gainesboro, TN, USA |
posted 06-20-2006 07:57
No it doesn't refresh when nothing is set. |
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 06-20-2006 10:24
Ok... does it refresh when you set outside the dialog return? |