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

Jeff Howden jeff at jeffhowden.com
Wed Nov 5 23:02:13 CST 2003


chris,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Chris George
>
> 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.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

how much different is it?  depending on what they want it to do, there might
be another way to do it.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> 		eval(detWin);
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

ewww.  (no offense)

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> 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');"
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

instead of writing out a statement to get executed, you could have just set
the window.returnValue to the link string.  then, do something like:

if(detWin)
  parent.innerNav(detWin);

if you really need the alert(), put it in an else statement.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> 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.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

you should be.  congrats.

.jeff

------------------------------------------------------
Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/



More information about the thelist mailing list