T
Thom.Burnett
I want to change an action based on values in a form.
The following javascript code works great in Firefox but not Internet
Explorer.
With IE the default action is always used by submit.
Any ideas why or suggestions on how to get it to work?
Please copy any answer to (e-mail address removed)
<script language="JavaScript" >
function setAction() {
var actionPath=document.mainForm.server.value ;
alert("actionPath is " + actionPath) ;
document.forms[0].action = actionPath ;
document.mainForm.action=actionPath ;
}
</script>
....
<form name="mainForm" action="http://192.168.5.80/cffprod/api/
proc" enctype="multipart/form-data" method="post"
onsubmit="setAction">
<br/>
Enter a container URL. <br/>
The default is for test. <br/>
The standalone uses: http://localhost:8888/apiServlet/proc <br/>
<input type="text" name="server" value="http://192.168.5.80/
cffprod/api/proc" size="60" onchange="setAction()" />
<br/>
The following javascript code works great in Firefox but not Internet
Explorer.
With IE the default action is always used by submit.
Any ideas why or suggestions on how to get it to work?
Please copy any answer to (e-mail address removed)
<script language="JavaScript" >
function setAction() {
var actionPath=document.mainForm.server.value ;
alert("actionPath is " + actionPath) ;
document.forms[0].action = actionPath ;
document.mainForm.action=actionPath ;
}
</script>
....
<form name="mainForm" action="http://192.168.5.80/cffprod/api/
proc" enctype="multipart/form-data" method="post"
onsubmit="setAction">
<br/>
Enter a container URL. <br/>
The default is for test. <br/>
The standalone uses: http://localhost:8888/apiServlet/proc <br/>
<input type="text" name="server" value="http://192.168.5.80/
cffprod/api/proc" size="60" onchange="setAction()" />
<br/>