Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button issues

Status
Not open for further replies.

masteryamaha

Programmer
Feb 13, 2005
15
US
I had on my site a standard button that you click and it shows some information (i realize i could use a collapsible document for this but i choes not to for a reason i can't remember). The button was put in with the button tag <button> and had all the information needed (i dont have the original code and canot remember everything but it had the usuall info) then it had an onClick="show_box" (this was a function from an external file that doesnt matter in my case). This worked fine, but i wanted a graphical button so i switched to the <form><input type="button"...method and had the src element right and the onclick the same. it still worked except the image did not display. its a .gif and i have a lot more .gif images on there that work fine. Please Help
 
it was something along the lines of <button name="submit".....other entries i dont remember (basic elements)...onClick="show_box()">Button Title</button> That is what worked.

now it is:
<form>
<input type="image" name="submitbutton" src="clanstats.gif" alt="clanstats"
onclick="show_box()" />
</form>
 
Why not just use:

<img name="submitbutton" src="clanstats.gif" alt="clanstats"
onclick="show_box()" />

Lee
 
Still doesnt show the picture, i double checked spelling and everything....any more ideas
 
If the picture isn't showing then I'd guess it's named differently than what the src is referring to.

Lee
 
Im getting the red cross and i double checked the id, im going to try using the image on something else on the site and see if it works.....i was alos thinking about using something like this

onclick="alert('info')

in the input button tag, but thats a last resort
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top