![]() |
unable to get values using DOM
below is the conde of my site wot im trying to make.
the problem is the i am not able to access the value of data entered in <input></input> :
document.getElementById('ty4').innerHTML=document.getElementById('ticket').value;this line retunrs undefined .. can any one help me out :
<html> |
Perhaps it's because there's not a element with id="ticket".
|
according to the the below its is an element....
http://msdn.microsoft.com/library/de...e/elements.asp |
now this is working fine .. why...
kindly explain :
<html> |
Quote:
|
document.getElementById does what it says on the tin. It gets elements by their "id" attribute. Your form has a name, but not an id:
:
<FORM name="ticket" > |
Did you read the response? In your first example, there is this block of statements (note the bold):
:
document.getElementById('ty1').innerHTML=document.getElementById('sev').value; |
thanks guys veys much ..
i did it .. thanks very much |
| All times are GMT -5. The time now is 2:28 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC