PDA

View Full Version : Urgent - Driving me Crazy Newbie


norway77
03-28-2006, 02:54 AM
i am trying to get the value of an ID (mainly <td> s)

I have this code
alert(document.getElementById(paxSeatHidden).value)

when i do this it works fine i get the value in the alert box.

when i try this so that i can compare the value with an if or switch statement
var temp = document.getElementById(paxSeatHidden).value;

i get this
"document.getElementById(paxSeatHidden) has no properties"

what am i doing wrong.
thanks in advance
danny

Single Paradox
03-28-2006, 03:43 AM
Well if you are mainly using table tds, try innerHTML instead of value.

Kor
03-28-2006, 07:46 AM
i am trying to get the value of an ID (mainly <td> s)

Not very clear. What are in fact your elements?