Jump to content

wiqi

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wiqi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. form validation should have to be done when mouse pointer is placed over the (onmouseover function) submit button. it seems like stop working when i include the onmouseover="document.myform.submit" as the default trigger for submit button.
  2. @rajiv I have to include this mouse over function. its essential to fulfill the requirements of this page.
  3. Well, its form validation isnt working. it should shown a msgbox if name or email fields are empty or if password is shorter than 6 chars when mouse hovers over the submit button. i dunno why it isnt working
  4. Please help me to figure out why this form isnt working at all.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Registration Form</title> </head> <body> <script type='text/javascript'> function formValidator(){ var name = document.getElementById('name'); var email = document.getElementById('email'); var password = document.getElementById('password'); if(notEmpty(name, "Please enter only letters for your First name")){ if(lr(password, 6, 12)){ if(notEmpty(email, "Please enter only letters for your Last Name")){ return true; } } } return false; } function notEmpty(elem, helperMsg){ if(elem.value.length == 0){ alert(helperMsg); elem.focus(); return false; } return true; } function lr(elem, min, max){ var uInput = elem.value; if(uInput.length >= min && uInput.length <= max){ return true; }else{ alert("Please enter between " +min+ " and " +max+ " characters"); elem.focus(); return false; } } </SCRIPT> <form action='' onsubmit='return formValidator()' name='myform' method='get' > <table width="425" height="166" border="0"> <tr> <td colspan="2"><h1>Registration Form </h1></td> </tr> <tr> <td width="122">Name</td> <td width="287"> <input name="name" type="text" id="name" maxlength="15" /> </td> </tr> <tr> <td>Email Address </td> <td><input name="email" type="text" id="email" maxlength="15" /></td> </tr> <tr> <td>Password</td> <td><input name="password" type="password" id="password" /></td> </tr> <tr> <td> </td> <td><input type="button" name="Submit" value="Submit" onmouseover=" document.myform.submit()" /> <input type="reset" name="reset" value="Reset" /></td> </tr> </table> </form> </body> </html>
  5. thank you very much man.. problem resolved. thanks alot once again
  6. how would i format these three variable into a sql recognized date format $mon=$_GET['mon']; $yr=$_GET['yr']; $dy=$_GET['dy']; also, the main question remains unsolved that how would i obtain teh data between two given dates
  7. its varchar (`adate` varchar(25) NOT NULL default '', ) but i was inserting date in it using $adate=date("d/m/y h:i:s"); should i change composition on table? also what query would work after changing the data type of adate column thanks for your time.
  8. hey there guys, I want your help. I want to select data between two date (suppose 12-3-2009 to 4-2-2010). I have converted the strings to date variables. table's variable is $tbl, starting date's $sdate and ending date is $edate. Please reply me with some query to solve this jigsaw out.
  9. I have downloaded the file given below http://www.lotsofcode.com/download/validation.zip i dont know how to POST this form's data to some other page after being validated. please help me out
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.