Can you recommend a good free Javascript pop-up menu?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Can you recommend a good free Javascript pop-up menu?

Post by JayBird »

Im looking for a free pop-up menu script.

I already have one but i doesn't have a particular feature i am looking for

I am looking for one that can position the menus relative to an image.

Thanks

Mark
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

Do you mean something like DeviantArt's one? Like you hover on an image and a menu appears, links inside are clickable.

-Nay
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

yup
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

mMm, I've been wanting one of those myself. Hold on, I'll make one up for both of us :D.

-Nay
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

Code: Select all

<script language="javascript" type="text/javascript">
<!--

function display(text) &#123;
var x = window.event.x;
var y = window.event.y;
document.getElementById("info").style.left = x;
document.getElementById("info").style.top = y;
document.getElementById("info").innerHTML = text;
document.getElementById("info").style.display = "block";
&#125;

function hide() &#123;
document.getElementById("info").style.display = "none";
&#125;

//-->
</script>

<div id="info" style="top:0;left:0;position:absolute;display:none;width:100;height:50;background:#cccccc;border:1 solid black"></div>

<br /><br /><br /><br /><br /><br />
<p onMouseOver="display('nay rules!');" onMouseOut="hide()">
who is nay?
</p>
That's how I did it. It works for me in IE 6.0, but nothing show's up in Mozilla though :(.

-Nay

ps: Not so good but it's free :D. So it matches one of yout request :D.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

that's because you're using some ie added functions. try finging the emca (i think that's the name) equivalent that both ie and mozilla recognize.. opps. that's right. ie doesn't care about standards, and only mozilla conforms to those standards
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

This work in both IE and Mozilla. Not PHP but let us benefit from the source coloring for Javascript too:

Code: Select all

<script language="javascript" type="text/javascript">
<!--
// First we need to know what is the user's browser
var isExplorer4p = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
var isNetscape5p = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "5");

function display (text, event) { // Mozilla: need to pass the event as function argument
	var x, y;
	if (isNetscape5p) {
		x = event.layerX;
		y = event.layerY;
	}
	else {
		x = window.event.x;
		y = window.event.y;
	}
	document.getElementById("info").style.left = x;
	document.getElementById("info").style.top = y;
	document.getElementById("info").innerHTML = text;
	document.getElementById("info").style.display = "block";
	return;
}

function hide () {
	document.getElementById("info").style.display = "none";
	return;
}

//-->
</script>

<div id="info" style="top:0;left:0;position:absolute;display:none;width:100;height:50;background:#cccccc;border:1 solid black"></div>

<br /><br /><br /><br /><br /><br />
<p onMouseOver="display('nay rules!', event);" onMouseOut="hide()">
who is nay?
</p>
Regards,
Scorphus.
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

By far the best one I've ever seen is ypSlideoutMenus from http://www.youngpup.com. Aaron's also a real nice guy, and although he's pretty busy, he'll help you out if your question is more than very basic.
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Oh, I guess I should mention the obvious: the source is available for download from the site, which also has examples of its use.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Unipus: Did you give the correct address for that site?

The one you gave has nothing there?

Mark
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Oh, oops... in included the period as part of the URL. Hey, and also it's .net and not .com! I'm on a roll today (or yesterday, rather)!

http://www.youngpup.net

Sorry.
User avatar
Vincent Puglia
Forum Commoner
Posts: 67
Joined: Thu Sep 04, 2003 4:20 pm
Location: where the World once stood

Post by Vincent Puglia »

Hi,

if you are still looking for one: http://www.brainjar.com -- Revenge of the Menu Bar -- while the demo shows text, you can replace the text with an image. You will also have to modify the main div's height.

Vinny
Post Reply