Hi,

I'm trying to submit a form using javascript on the fly and am changing the action. It works if i change the method to get, but doesn't send the form if the method is post, does anyone have any ideas?

Page 1
Code:
<html>
<head>
<script language="javascript">
<!-- // Begin Hide
	function goFindPerson(sParent){
		document.myForm.txtParent.value=sParent;
		document.myForm.action="findPerson.asp";
		document.myForm.method="post";
		document.myForm.submit();
	}

// End Hide -->
</script>
</head>
<body>
<form id="myForm" name="myForm" method="post" action="sendMail.asp">
<input type="hidden" name="txtParent" id="txtParent" />
<table>
	<tr>
		<td>To:</td>
		<td>
			<select name="ddlTo" id="ddlTo">
				<option value="0" selected="selected">[Select]</option>
				<option value="[email protected]">[email protected]</option>
				<option value="[email protected]">[email protected]</option>
			</select>
			<br />
			<textarea name="txtTo" id="txtTo" rows="3" cols="75"></textarea>&nbsp
			<input type="button" onclick="goFindPerson('txtTo')" value="find" />
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
</table>
</form>
</body>
</html>
Page 2
Code:
<html>
<head>
</head>
<body>
<p>
<%="Form: " & Request.Form("txtParent")
%>
</p>
</body>
</html>
Any help or ideas will be greatly appreciated

Cheers Al