PDA

View Full Version : Programming Buttons


DTB Pro
09-10-2009, 03:11 AM
Hi. First post and I'm a total noob. Sorry if it's been asked a million times. I'll be happy with a link in the right direction. I'm trying to learn how to create and program buttons. I've seen the button images folder and so forth, but I'm not familiar with the coding. Like, I really just want a button to simply link to another page when it's pressed. Also, I think I read somewhere you can override the button images folder and hard code the location. So, any help here would be much appreciated.

Thanks.

Lynne
09-10-2009, 03:53 AM
I'm really not exactly sure what you are talking about in regards to programming buttons and hard coding their locations. Buttons usually have a task of submitting a form which then performs an action. Like, I'll hit the Post Quick Reply button in a moment. Or, I could have hit the Post Reply button to get a new page to reply on. Or, I will be able to hit the Edit button to edit this post once I submit it. So, basically, in order to program a button, you need to create a form and some code to perform an action.

TimberFloorAu
09-10-2009, 05:01 AM
Bit like:

<a href="register.php"><img src="http://myforum.com/forum/images/registerbutton.png" border="0"></a>

I would think he means ? not 100% sure tho

DTB Pro
09-10-2009, 01:39 PM
Bit like:

<a href="register.php"><img src="http://myforum.com/forum/images/registerbutton.png" border="0"></a>

I would think he means ? not 100% sure tho

Yeah, I think that's what I'm after. So, if my logo was that image, it would automatically be a button?

Thanks.

Lynne
09-10-2009, 01:51 PM
It would automatically be a link to wherever you link to in your <a> tag.

DTB Pro
09-10-2009, 05:00 PM
It would automatically be a link to wherever you link to in your <a> tag.

Great, thanks! Now I'm trying to put a different button when I hover over it. I'm using this:

hoversrc=" pic.gif "

right after img src is done

However, no luck.

--------------- Added 1252607656 at 1252607656 ---------------

Well...I gave this a whirl, but still no dice:

<SCRIPT language="javascript1.1">
gifHome = new Image(54,18)
gifHome.src = "home.gif"
gifHome2 = new Image(54,18)
gifHome2.src = "home2.gif"

function changeImg(cImg,ref) {
document.images[cImg].src = ref.src
}
</SCRIPT>

<a href=url onMouseOver=”changeImg(‘imgHome’ ,gifHome2)” onMouseOut=”changeImg(‘imgHome’ ,gifHome)”><img src="file"
border="0" name=”imgHome” alt="$vboptions[bbtitle]" ></a>