Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:22
Show popup window with a JavaScript onClick call
Poster: Steel2k6
Dated: Tuesday December 6 2005 - 9:43:24 GMT
Hi!
I would like to show a popup window when I click on a link. For some reason, this does not work. But it works when I call this function on a onMouseOver event for a link. Strange...
So, this works fine:
<a href='#' onMouseOver='popup( "workout",1 );' class='weekCalendarLink' id='entry_1_1'>9:30<br>Workout</a>
This does not work:
<a href='#' onClick='popup( "workout",1 );' class='weekCalendarLink' id='entry_1_1'>9:30<br>Workout</a>
Do you know why or how I could solve this problem? The live page can be found at http://www.get-up-fitness.de/wintercourseplan.aspx .
Thanks!
Poster: Steel2k6
Dated: Tuesday December 6 2005 - 13:41:51 GMT
Milonic team, please help. I saw that this question has been asked a few days ago from another user:
http://www.milonic.com/forum/viewtopic. ... ight=popup
Poster: Steel2k6
Dated: Tuesday December 6 2005 - 20:53:24 GMT
For everybody who has the same problem and does not want to wait for the answer, this can be used as a workaround:
function initPopup( menuName )
{
setTimeout( "showPopup('" + menuName + "')", 1 );
}
function showPopup( menuName )
{
popup( menuName, 1 );
}
<a href='#' onClick='initPopup( "workout" );' class='weekCalendarLink' id='entry_1_1'>9:30<br>Workout</a>
Poster: Andy
Dated: Wednesday December 7 2005 - 11:03:31 GMT
Hi,
What's happeing is the page is being reloaded because of the href=# bit when you click on the link. The menu is probably showing up but it gets refreshed so you never see it.
You need to replace the href="#" with href="javascript:popup('yourmenu','yourimage')" - This will mean that the link is the javascript popup function executor rather than an actual lnk.
Hope this helps,
Andy
Industrial Strength JavaScript and DHTML Menus
About Us
Testimonials
Contact Us
Our Distinguished Clients
Investing in Non-Profits
Where Are We
Privacy Policy
Software Licensing Agreement
DHTML JavaScript Menu
Product Information
Page Integration
Quick Reference Guides
Embedding Into a Table or DIV
Purchase
