getElementById is not working in my script

RegisterLogin
getElementById is not working in my script
Post Description: i have a short javascript script which is not working and i dont know what i am doing wrong. i have tried so many times to get it to work but its impossible so i just gave up and thought maybe you guys can help me
Tags: getelementbyid, is, not, working, in, my, script
This Post Was Posted On Mar 29, 2010 By Celverclovis #3299
i have a short javascript script which is not working and i dont know what i am doing wrong. i have tried so many times to get it to work but its impossible so i just gave up and thought maybe you guys can help me,

this is how my function looks like:

<script type="text/javascript">
function CheckForm(){
alert(getelementbyid('q1').value);
}
</script>


and this is how my submit button looks like:
&lt;input type=&quot;button&quot; name=&quot;q1submit&quot; id=&quot;q1submit&quot; value=&quot;Submit&quot; onclick=&quot;CheckForm();&quot; /&gt;

so when i click on my button, nothing happens, i dont get a popup
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
webune
#3653 1
you need to change your code to look like this:
<script type="text/javascript">
	function CheckForm(){
		alert(document.getElementById('q1').value);
	}
</script>
Mar 29, 2010 Reply Report abuse
©2011 Webune Forums - Wed Dec 21, 2011 12:39 am
Powered by: Webune Forums V3