document.getElementById('field').value

Welcome to Webune Forums.

Webune Offers Web Hosting for many sites.

One of the cool features about websites is the ability to use Javascript on your webpages.

if you are familiar programming in javascript or are new to javascript, perhaps you might find this short tutorial on about using javascript getElementById() function.

this is an example script you can use to see how you can get the value of a field using getElementById...



<script type="text/javascript" language="javascript">
function submitted(){
	var form = document.myform2
	for (i = 0; i < form.elements.length; i++) {
		alert(document.getElementById(i).value);
	}
}
</script>
Colors:
<form name="myform2">
	first color: <input type="text" id="0" value="red"><br />
	second color: <input type="text" id="1" value="blue"><br />
	third  color: <input type="text" id="2" value="green"><br /><br />
	<input type="button" value="send" onclick="submitted();"/>
    </form>