Changing a form action and calling a php script results in dreamweaver loading the script in edit mode...I don't know why this is happening. Any thoughts or direction would be appreciated.....code is below. FYI options which go to html work correctly.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Switching action </title>
</head>
<body>
<SCRIPT language="JavaScript">
function OnSubmitForm()
{
if(document.ckform.operation[0].checked == true)
{
document.ckform.action ="setcookie.php";
}
else
if(document.ckform.operation[1].checked == true)
{
document.ckform.action ="update.php";
}
else
if(document.ckform.operation[2].checked == true)
{
document.ckform.action ="insert.html";
}
else
if(document.ckform.operation[3].checked == true)
{
document.ckform.action ="update.html";
}
return true;
}
</SCRIPT>
<FORM name="ckform" onSubmit="return OnSubmitForm();">
Cookie Name: <INPUT TYPE="TEXT" Name="cn"><br>
Cookie Value: <INPUT TYPE="TEXT" Name="cv"><br>
<input type="radio" name="operation" value="1">Add
<input type="radio" name="operation" value="2">Edit
<input type="radio" name="operation" value="3">Delete
<input type="radio" name="operation" value="4">View
<P>
<INPUT TYPE="SUBMIT" name="Submit" VALUE="Execute">
</P>
</FORM>
</body>
</html>