Also, the form is comming from a sepereate page. I have soemthing like this:
Code: Select all
<div id="content">
<? include('myform.php'); ?>
</div>Moderator: General Moderators
Code: Select all
<div id="content">
<? include('myform.php'); ?>
</div>Code: Select all
<script language="Javascript"><!--
function reflowContent(formObj,newContent)
{
if( typeof formObj == "object" && typeof newContent == "string")
formObj.innerHTML = newContent;
}
function formSubmit(formObj,flowHere)
{
// do your validation here.
// if it's all good, reflow the content.
var container = ((document.getElementById)?(document.getElementById(flowHere)):(document.all[flowHere]));
reflowContent(container,"blah blah blah blah blah new content!");
// because the form doesn't really submit anywhere, tell the browser to not send it.
return false;
}
--></script>Code: Select all
<form onsubmit="return formSubmit(this,'content')"><input type=text name="junk" value="junk"></form>