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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image swap on a <div>

Status
Not open for further replies.

fuli42

Technical User
Jul 9, 2002
74
HU
Hello!

Could someone please spare me, or point me to a link for a script that changes an image that is placed in a <DIV>.

As soon as an image is not just hanging by itself (in a cell for example), you need to have different scripts to accomodate for the different DOM layout of different browser. The one I am currently using works only with IE, but not on any other browser.

Anybody has a script that works on layers (div that is) as well?

THank you all,

Fuli42
 
You can always access any image as an item of document.images[] array by it's number in this array or given name:
document.images[2]
document.images['third_img']

No need in any DOM games here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top