Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
i can't understand what is the problem the code given below . when i submit the form it gives message document.form.submit() is not function
checkadmin and userendpage is just a html include file and validate js file is javascript function libraryCode: Select all
<?
//include_once("includes/dbconnect.php");
include_once("includes/functions.lib.php");
//include_once("includes/pagination/my_pagina_class.php");
checkAdmin();
?><head>
<script languaage="javascript" src="includes/validate.js"></script>
<script languaage="javascript" >
function check()
{
a=document.form;
var msg="";
msg+=checkpassword("Password",a.password1.value);
if(msg!="")
alert(msg);
else
a.submit();
}
</script>
</head>
<?
userStartPage();
?>
<?
if(isset($_POST['submit']))
{
echo "hello";
}
?>
<form name="form" method="post">
<table >
<tr>
<td>
Enter The New Password
</td>
<td>
<input type="password" name="password1">
</td>
</tr>
<tr><td>Enter the Verify Password</td><td><input type="password" name="password2"></td></tr>
<tr>
<td align="right"><input name="submit" type="button" value="submit" onClick="check()"> </td>
<td> </td>
</tr>
</table>
</form>
<a href="logout.php">Logout</a>
</body>
</html>
<?php // $test->free_page_result(); // if your result set is large then free the result here ?>
<? userEndPage(); ?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]