| | |
picture change
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
You can give an html element an ID.
Then look the object up using the ID.
Now you have a reference to the dom element and you can interact with its properties...
That is pretty much all you need to do...
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<img src="something.jpg" id="yourId">
Then look the object up using the ID.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
var domElement = document.getElementById("yourId")
Now you have a reference to the dom element and you can interact with its properties...
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
domElement.src = "somethingnew.jpg";
That is pretty much all you need to do...
![]() |
Similar Threads
- How to Change the Default Icons for Folders in Windows XP (Windows tips 'n' tweaks)
- [help] Image changes (JavaScript / DHTML / AJAX)
- any MS Access experts!! (MS Access and FileMaker Pro)
- loop help (C++)
- picture viewer taken over (Windows 95 / 98 / Me)
- spyware nasty (Viruses, Spyware and other Nasties)
- Changing the way how XP looks (Windows NT / 2000 / XP)
- change image one by one (ASP)
- Change the Picture on the Welcome Screen (Windows tips 'n' tweaks)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Urgent : Need Help !!!
- Next Thread: random slideshow with random timer...
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser bug captchaformproblem cart checkbox child class close codes createrange() css cursor date debugger decimal dependent design disablefirebug dom dropdown 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 images index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming progressbar prototype redirect runtime safari scale scriptlets scroll search security shopping size software toggle unicode w3c web wysiwyg \n





