From: Dougal C. <do...@gu...> - 2001-07-11 19:07:22
|
On Tue, 10 Jul 2001, Joachim Lundgren wrote: [....] > >But it seems that DynAPI's events are passing the click through anyways, > >so what happens is that the showGuiWin() function is executed, but then > >the browser loads foo.html. > > > >How can I accomplish what I'm trying to do? > > > I think alert() and other lengthy operations such as open new browser windows will cancel the return value (that was totally clear, wasn't it?) because the browser needs the return value ASAP (preferably sooner) and when the onclick event takes a long time the return value is scrapped. [I may be totally off track here, but that is how it appears to me.] > > <a href="foo.html" onclick="setTimeout('showGuiWin();',0); return false;">Foo!</a> > > should do the trick (and does for me). Nope, stil doesn't work for me. I've narrowed it down, and it has something to do with DragEvents (I have draggable layers in my doc). I set up a simple test case: http://www.mentalcollective/test2.html If you click the "stuff" link, it will display an alert. After you click Okay, it loads the url from the link. But look at: http://www.mentalcollective/test3.html The is the exact same code as test2, except I commented out the DragEvent.enableDragEvents(myLayer) line. And on this one, clicking the "stuff" link will *not* load the url. Something in the document is altered when DragEvents are enabled. And even disabling them doesn't undo it (see the "Disable Dragging" link in the blue layer). -- Ernest MacDougal Campbell III, MCP+I, MCSE <do...@gu...> http://dougal.gunters.org/ http://spam.gunters.org/ Lumber Cartel Unit #1654 (tinlc): http://come.to/the.lumber.cartel/ This message is guaranteed to be 100% eror frea! |