| | |
im a wits end on img swap with onClick
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2008
Posts: 7
Reputation:
Solved Threads: 0
I am trying to create this code for my website but i am having trouble per when you click the button for corrosponding with correct image it does not on call take that image and show it as my main one i can not get my img swap to work and have been trying for hours
and
<html>
<body bgcolor= "#950606">
<body>
<h3>first try at pic swap</h3>
<form Name= theForm>
<hr>
<table border = 1>
<tr>
<td colspan= 3>
<center>
<img name = imgDisplay
src= "C:\html\images/flamechick.jpg"
height = 100 width = 100>
</center>
</tr>
<tr>
<td><img src= "C:\html/flamechick.jpg"
height = 50 width = 50
name = "imgFlamechick">
</td>
<td><img src= "C:\html/battle.jpg"
height = 50 width = 50
name = "imgBattle">
</td>
<td><img src= "C:\html/meandsnake.jpg"
height = 50 width = 50
name = "imgMeandsnake">
</td>
</tr>
<tr>
<td><input type="button"
value="Flamechick"
onClick= "showFlamechick()">
</td>
<td><input type="button"
value="Battle"
onClick= "showBattle()">
</td>
<td><input type="button"
value="Me and Snake"
onClick= "showMeandsnake()">
</td>
</tr>
</table>
</form>
</body>
</html>
and
<html>
<body bgcolor= "#950606">
<body>
<h3>first try at pic swap</h3>
<form Name= theForm>
<hr>
<table border = 1>
<tr>
<td colspan= 3>
<center>
<img name = imgDisplay
src= "C:\html\images/flamechick.jpg"
height = 100 width = 100>
</center>
</tr>
<tr>
<td><img src= "C:\html/flamechick.jpg"
height = 50 width = 50
name = "imgFlamechick">
</td>
<td><img src= "C:\html/battle.jpg"
height = 50 width = 50
name = "imgBattle">
</td>
<td><img src= "C:\html/meandsnake.jpg"
height = 50 width = 50
name = "imgMeandsnake">
</td>
</tr>
<tr>
<td><input type="button"
value="Flamechick"
onClick= "showFlamechick()">
</td>
<td><input type="button"
value="Battle"
onClick= "showBattle()">
</td>
<td><input type="button"
value="Me and Snake"
onClick= "showMeandsnake()">
</td>
</tr>
</table>
</form>
</body>
</html>
You really must be at your wits end.. because you posted this in the Java programming forum instead of the Javascript forum which is clear over here: http://www.daniweb.com/forums/forum117.html
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Google Maps HELP please.
- Next Thread: How to set only Letter and space
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser captcha captchaformproblem cart child class close codes column css date debugger decimal dependent design disablefirebug dom download editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index java javascript javascripthelp2020 jquery jsf jsp jump libcurl listbox maps masterpage math media menu mp4 object onerror onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming prototype rated rating redirect safari scale scriptlets scroll search security select software star starrating stars synchronous toggle unicode variables w3c web webservice \n





