Apr 10, 2012, 12:38 PM
Post #5 of 6
Re: [aurora] onClick event is not working in cgi
[In reply to]
- Your "complete code" does not make use of the code in your original post.
- You can print blocks of HTML (see example below).
- If you do want to use individual print statements, its probably best to use quote like operators e.g. q or qq.
- For top marks, use a template module!
- Your code makes no special use of Perl and as it stands would be more suitable in a html file.
my $cgi = CGI->new();
var myForm = document.form1;
var userid = myForm.userid.value;
if (userid == "")
alert('Please enter your user id');
alert('Your user id is ' + userid);
<form id="form1" name="form1">
User ID: <input type="text" name="userid" value="" size="7" />
<input type="Button" id="val" value="View" align="middle" onclick="CheckForm_onclick()" />
(This post was edited by Zhris on Apr 10, 2012, 12:40 PM)