Keepalive v. Closeonclick

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
DMLCo
Advanced
Advanced
Posts: 21
Joined: Fri Sep 19, 2003 4:29 pm
Location: Houston, TX
Contact:

Keepalive v. Closeonclick

Post by DMLCo »

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: Select all

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: Select all

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: Select all

<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
DMLCo
Solving the Challenges Where People & Technology Meet
Featuring DMLContent Content Management System
http://www.dmlco.com/
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Milonic is currently working on such a product, see http://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
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
DMLCo
Advanced
Advanced
Posts: 21
Joined: Fri Sep 19, 2003 4:29 pm
Location: Houston, TX
Contact:

Post by DMLCo »

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
DMLCo
Solving the Challenges Where People & Technology Meet
Featuring DMLContent Content Management System
http://www.dmlco.com/
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
DMLCo
Advanced
Advanced
Posts: 21
Joined: Fri Sep 19, 2003 4:29 pm
Location: Houston, TX
Contact:

Post by DMLCo »

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
DMLCo
Solving the Challenges Where People & Technology Meet
Featuring DMLContent Content Management System
http://www.dmlco.com/
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply