Jump to content

swap radial buttons for graphic


POMO-man

Recommended Posts

I'm working on a page using the DOM whereby selecting a radial button swaps out a graphic for a new graphic without reloading the page. It's working okay... Sorta...:) But, I don't want the radial buttons, any more. I want to utilize a small, clickable graphic instead (which means I'll dump the text and the radial button and have a graphic that is clicked to swap out the main graphic). I'm not sure how to do this... i can handle making the graphic and inserting it into the DIVs... but not sure how it will interact with the form method and such... I'm sorta "new" to forms and DHTML...Here's the code. Any help would be appreciated.

<div id="hydropodcontainer"><form action="" method="post"><div id="hydronames"><p><input type="radio" name="hp"checked="checked"onclick="document.hp.src='graphics/HP_Rangler.jpg';" /><strong>Rangler</strong>: Clan: Hydro-Pod</p><p><input type="radio" name="hp"onclick="document.hp.src='graphics/HP_Clamp.jpg';" /><strong>Clamp</strong>: Clan: Hydro-Pod</p></div><div id="hydroimage"><img name="hp" src="graphics/HP_Rangler.jpg" alt="Hydro-Pod Rangler" width="220px" /></div></form></div>
Link to comment
Share on other sites

<div id="hydropodcontainer"><form action="" method="post"><div id="hydronames"><p><img src="your image" alt=""onclick="document.hp.src='graphics/HP_Rangler.jpg';" /></p><p><img src="your image" alt=""onclick="document.hp.src='graphics/HP_Clamp.jpg';" /></p></div><div id="hydroimage"><img name="hp" src="graphics/HP_Rangler.jpg"alt="Hydro-Pod Rangler" width="220px" /></div></form></div>

try this

Link to comment
Share on other sites

I will. Thanks a million!

<div id="hydropodcontainer"><form action="" method="post"><div id="hydronames"><p><img src="your image" alt=""onclick="document.hp.src='graphics/HP_Rangler.jpg';" /></p><p><img src="your image" alt=""onclick="document.hp.src='graphics/HP_Clamp.jpg';" /></p></div><div id="hydroimage"><img name="hp" src="graphics/HP_Rangler.jpg"alt="Hydro-Pod Rangler" width="220px" /></div></form></div>

try this

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...