PDA

View Full Version : Help with making graphic buttons into drop down menu links...



Reggie31
09-18-2004, 04:39 AM
I made some graphic buttons and would like for them to work as a mouse over menu so others can access the links I would like to attach to that each button. I don't want to link each button to a main page with the links for that section. I'd love to skip that step and save space.

If you can understand what I am asking I would be greatful for any advice on where or how I can accomplish this or any changes I can make to an oalready existing html/script code.

sgt
09-23-2004, 09:56 PM
I do not know the answer to your question, but i think you might have more success in getting an answer if you had actually posted in somewhere other then the html section of the forum, html is one of the simplest forms of webpage coding, where you should post if probably the javascript/dhtml category

codejunkie
09-24-2004, 01:56 PM
I believe what you are trying to do is have an image for a button? the code is

<img src="name"><a href="url">name</a>

or are you trying to use an image as an imput button? I don't quite remember the codes for buttons, I never use them. Just make a button and then add the link inside of them.

Hope this helps :)
Rob

cr3ative
09-24-2004, 02:44 PM
Isn't it this?:

<a href="url"><img src="name">name</a>

Ah, whatever, i'm sure either will work.
cr3ative

Nate_Bro
09-25-2004, 03:02 PM
Is this what you where going for? :confused:





<!-- place the following code within the <BODY> of your document -->

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

normal_image = new Image();
normal_image.src = "path/img.gif";

mouseover_image = new Image();
mouseover_image.src = "path/img2.gif";


<!-- repeat the 4 lines above for any subsequent images. -->

function swap(){
if (document.images){
for (var x=0;
x<swap.arguments.length;
x+=2) {
document[swap.arguments[x]].src = eval(swap.arguments[x+1] + ".src");
}
}
}
</script>

<!-- Place this code where you want the rollover buttons to appear.
Parts to change here: name_of_img (to match <img name="", below), Image variable (e.g mouseover_image/normal_image - to match above code), href element to your documents url and the img name & src. -->

<a href="page.html" onMouseOver="swap('name_of_img','normal_image')" onMouseOut="swap('name_of_img','mouseover_image')"><img name="name_of_img" src="path/img.gif" border="0"></a>

codejunkie
09-27-2004, 12:22 AM
Sorry, it's <a href="URL"><img src="name">name</a> after all. That's what happens when you're tired and dont pay attention lol. Sorry about that.

Reggie31
09-30-2004, 04:02 AM
I will give them a try.

I know how to link the small images as a button I just wanted to make it so when you moused over that image it gives you a dropdown menu which also allows you to click on any one of the names in that particular menu and go to the link connected to each name. Is this a little more clear?
I am not sure that this might even be possible.

I haven't had time to play with this but I will give it a try soon and see if any off the information you gave me works.

Thank you!