View Full Version : Image-type input tags

02-10-2004, 01:58 PM
Does anyone know what collection input tags of type image belong to. They neither belong to the form elements or images collections?

This has got me stumped! :rolleyes:

02-10-2004, 02:23 PM
Who cares? :D But why do you need to know? You want to refere a property?

02-10-2004, 02:30 PM
i'm creating a custom attribute to handle rollovers. the script is being adapted from one i dowloaded from young pup (http://www.youngpup.net) .

however, the amendment wont work with tags of input-type image.

if you create a form with only one form element - namely, an input tag of type image - and alert the form's elements length, you get zero. it should in theory be 1, but it ain't. also the image doesn't appear in the images collection, so it's kinda got me stumped!

any ideas?

02-10-2004, 02:45 PM
Yes, phoney indeed.

You better use the DOM references instead of form based refs:

getElementById(id) or getElementsByTagName('input')

02-10-2004, 03:08 PM
Hmm ... the script (as is anyway) doesn't really lend itself to that sorta coding. Could prolly work around that, but it doesn't look too promising.

goes off to think a little ... :confused:

02-10-2004, 03:18 PM
done it. works like a wee treat. :D