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
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
getElementById is not working in my script by Celverclovis
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:
<input type="button" name="q1submit" id="q1submit" value="Submit" onclick="CheckForm();" />
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
Powered by: Webune Forums V3