As far as I know, there are two ways to get a value from a text field:
document.formName.textboxName.value;
or
document.getElementbyId('textboxId').value;
As I understand it, using the form name means that I have less code to write, since the name can be used to publish data and get the value (other than using ajax). How and where, if I just published using the standard form, I would use name to publish, but I can not use id ?
eg. in php i would use
$_POST['texboxName'];
If I have and ID in the text box, I can not get the value using php?
What is the standard recommended way to do this and uses a name friendly browser? Links, if possible, please, thanks.
javascript standards xhtml
Elliott
source share