Re: Javascript / browser question
- From: "scripts.contact" <scripts.contact@xxxxxxxxx>
- Date: 27 Apr 2007 22:39:01 -0700
Thom.Burnett wrote:
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?
Try this:
<script>
function setAction(form) {
var actionPath=form.server.value ;
form.action = actionPath ;
}
</script>
....
<form name="mainForm" ... onsubmit="setAction(this)">
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" ....
onchange="setAction(this.form)" />
<br/>
</form>
Please copy any answer to Thom.Burnett@xxxxxxxxx
Focus the message in your newsreader. Press Ctrl+A, Right click and
choose Copy.
Open your mail-app, click Compose, right-click and select Paste. Enter
your email address in To field and click Send.
.
- References:
- Javascript / browser question
- From: Thom.Burnett
- Javascript / browser question
- Prev by Date: Re: what javascript lib?
- Next by Date: Re: Adaptive forms
- Previous by thread: Javascript / browser question
- Next by thread: onmousemove tracking works in IE - not in Firefox
- Index(es):
Relevant Pages
|