we have a form and if we would like to pass some hidden fields.say,username is hidden but required and email and password is what the user form is about:-
passing the email as username in a form submission
<html>
<head>
<title>Untitled Document</title>
<script language="javascript">
function fillname(val)
{
document.form1.textname.value=val ;
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" action="">
user email <input type="text" name="txtmail" onChange="fillname(this.value)">
<input type="hidden" name="textname">
</form>
</body>
</html>
LastMitch
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.