Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:10

Keepalive v. Closeonclick


Poster: DMLCo
Dated: Wednesday September 24 2003 - 15:44:32 BST

I want to use the menu to create, essentially, call-outs. The idea is that, when a user clicks on a graphic, a small explanatory box appears. No problems so far.

I would like the box to remain visible until the user clicks anywhere on the page, and then disappear. So far, no luck: the box appears onClick, then nothing I do closes it.

The site isn't yet posted on the web, unfortunately--maybe by the end of the day or tomorrow. As such, I've included the relevant code bits below. I think I'm missing something stupid ...

Code:
with(feature=new mm_style()){
   offcolor="#000000";
   offbgcolor="#FFFFFF";
   oncolor="#000000";
   onbgcolor="#FFFFFF";
   bordercolor="#000000";
   borderstyle="solid";
   borderwidth=1;
   padding=3;
   fontsize=12;
   fontstyle="normal";
   fontfamily="Arial, Helvetica";
   align="center";
}


and

Code:
with(milonic=new menuname("f_hme_prods")){
   style=feature;
   itemwidth=200;
   keepalive = 1;
   closeonclick = 1;
   aI("text=<table border=\"0\" cellpadding=\"0\" cellpadding=\"0\"><tr><td bgcolor=\"#000066\"><table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\"><tr><td class=\"textRow\"><img src=\"images/end.gif\" width=\"10\" height=\"10\">&nbsp;The products above are generated randomly from the Product Pages.  Refresh the page to see.</td></tr></table></td></tr></table>;");
}


and then what actually calls the menu:

Code:
<img src="images/feature.gif" width="66" height="15" alt="Click!" name="f_hme_prods" border="0" onClick="popup('f_hme_prods', 1);" onMouseOver="MM_swapImage('f_hme_prods','','images/feature_ovr.gif',1);" onMouseOut="popdown();MM_swapImgRestore();">


I've done it with and without the closonclick=1; and with and without the onMouseOut podown(); without any difference in behavior.

-Daniel


Poster: Hergio
Dated: Wednesday September 24 2003 - 17:59:54 BST

Milonic is currently working on such a product, see http://www.milonic.com/tooltips.php Its not developed yet, but someday it will and it will be designed with the high standards set by the menu. Tooltips are what they are called, by the way. ;)

Also if you RightClick on Andy's website homepage you will see alittle pop up context menu. Is that the type of behavior you are looking for? If so, this is one of the many features on the near horizon for the menu that will be released soon. Stay tuned (I feel like I say that too much, but its so true, things roll out faster than you'd think). :D


Poster: DMLCo
Dated: Thursday September 25 2003 - 21:09:24 BST

No, not really ...

All I want is for the menu to appear on click, then close again on click.

Click on the image, see the menu. Click anywhere else on the page, bye-bye menu.

The documentation on keepalive makes it sound like this should do it, but I haven't had any luck with it.

-Daniel


Poster: Maz
Dated: Friday September 26 2003 - 1:14:41 BST

I can't figure it out either, what it needs is something like onclass offclass alwaysvisible=0 alwaysvisible=1
I don't think its a onfuction but I could be wrong.

Let me know,
maz


Poster: DMLCo
Dated: Friday September 26 2003 - 17:04:19 BST

The site in question is live now.

Go to http://www.hipbrick.com/

and click on any of the "Feature" buttons to see where the issue is: I want those tooltips ( ;) ) to appear and close with clicks.

-Daniel


Poster: Hergio
Dated: Friday September 26 2003 - 18:48:10 BST

Seems pretty nice. Nice site layout by the way, like the 'feel' of it. The way they work seems relatively intuitive...they stay open indefinetly until you mouseout of them. Of if you never actually mouseover them, they also stay and they dont close on click, so I see where you are coming from. Most people would then mouseover them at least. What you may want to try is, setting your document.onClick even to call the pop down function always. This would mean anytime you click, all menus would close. I am unsure as to the timing on this, as in, would this close menus before you got a change to click the link or would it close a menu you just opened. You could try and see. I will think about it more.