[thelist] Follow-up on my showModalDialog problems...

Chris George cgeorge at basecorp.com
Wed Nov 5 15:02:45 CST 2003


Hey all,

First off, thank you very much for all the help. Based on some of the
emails, I was able to come up with a pretty basic solution.
Functionally, it won't operate the way they want, but it's close enough
that the client should be happy with it.

First of all, I had to modify how the window was being called:

function openDetails()
{
	if(detailsURL.length>0)
	{
		var
sFeatures="dialogHeight:670px;dialogWidth:535px;scroll:no;unadorned:yes;
status:no;resizable:no;help:no;";
		var detWin = window.showModalDialog(detailsURL, "",
sFeatures);		
		eval(detWin);
	}
	else
	{
		alert("No details available");
	}
}

Basically the key line is instead of just calling
window.showModalDialog, it gets executed in the eval.

Then in the child window, I have the following:
function linkAndRun(link) {
	window.returnValue="parent.innerNav('"+link+"')";
	window.close();
}

Which is called from an onclick="linkAndRun('http://www.google.ca');"

The resulting functionality is that when user clicks the link, the
window disappears and the correct page/screen/navigation comes up.

Aaaaanyway. I guess it's pretty basic, but I'm rather proud of myself.
:p

Thanks again,

Chris.


More information about the thelist mailing list