Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>Document.getElementById() has no properties

Document.getElementById() has no properties

meena
02-04-2005, 06:33 AM
The code works on IE but not in Mozilla. I have a table and i am trying to get the value of one of the textfields.
For eg. var name = document.getElementById("name").value;

Is there any other way .. how can i make changes to this script

Brandoe85
02-04-2005, 06:44 AM
Lets see the script, and then expain exactly what you need help with.

liorean
02-04-2005, 06:50 AM
Well, the obvious question is: Does there exist an element with an id attribute with the value "name" in the document?

meena
02-04-2005, 06:51 AM
I am trying to covert a RGB color scheme to CMYK code.
I have a color palette ...where it picks up RGB colors. The moment the user selects the RGB color, corresponding CMYK values shud be posted in four text fields. Now i have the C value and just need to put the same in the textfield whose name is cyan.
so my code goes this way ..

document.getElementById("cyan").value= C;

This works in IE, but in Firefox, gives an error document.getElementById("cyan").value has no properties

liorean
02-04-2005, 07:00 AM
Insufficient data for us to say anything - show us the source or link to it.

jmccaskill
02-04-2005, 01:51 PM
Maybe the element has a name attribute but not an id attribute. getElementById is supposed to return the element with the specified id, but IE will also return an element with that name.


 

TOP

For more info

setting a minimum size
Auto Preview of Image 
Refresh with a query s
JS Validation obsolete
Javascript Pop up func
Slide show transitions
I'm a newbie...please!
how to write coding in
Advanced Debug Info 
.js file doesn't work 

News Archive

Adding Graphic To Text
re-direct form after s
pop up window controls
Clock on homepage - He
passing a param from a
Password Procection wi
document.title in same
focus onload 
Counting Wrong from Ri
Help needed on how to 

Related stories:

window.open By Using onClick in <option> tag?
contentEditable in Gecko
Problems with insertbefore method
Combine Hightlight with Add and Delete Selected Row
Change background for different resoloutions?
Add and delete rows dynamically to an HTML table .... ?
script does not work on Mozilla FIrefox when doctype is on the html code
smart menu

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics