ID is generally IE-only , if you use name= it will work for ie as well as most other browsers, and i belive it is the standard, use ID if you are using IE only with some client side vbscript , but other than that, they're pretty much the same. Karl Blessing aka kb244{fastHACK}
If you are working with Active Server Pages, keep your client-side as standard as possible, that means using VBscript on the serverside, but javascript on the client side. Karl Blessing aka kb244{fastHACK}
In some cases you can get away with name and no id, in others id but and no name.
id is supposed to be used to reference an object from script, while name is primarily intended to label form elements (name/value pairs) for get/post requests.
It is a pain, but in most cases you'll be better off putting both on an element that needs identification, and make them equal to the same string.
The weird thing is even if you use id for scripting, if you don't use name for a group of elements you want to appear as a collection (by using the same name string) then it won't work right.
Someday (soon?) Netscape will go away and the world will be easier for developers - though this is probably not the best of all possible worlds for computer users at large.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.