Re: Javascript / browser question




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.

.



Relevant Pages

  • Re: firstNode problems
    ... > What it should do (and indeed, what it does do, in Internet Explorer) ... In Firefox, however, it shows a black box. ... handles these spaces as firstChild, ...
    (comp.lang.javascript)
  • Re: Install Internet Explorer 7 now
    ... Andy you should be able to call JUNO from Firefox without Juno's software. ... I have to use "Explorer" to get on the internet, ... that makes a computer on the internet vulnerable to mischief.... ... But that you did make that other posting and some of your ...
    (soc.retirement)
  • Internet Explorer vs. Firefox
    ... In several instances I was advised to switch from Microsoft's Internet ... Explorer to Mozella's "Firefox". ... I have tried Firefox and Mozella both, but without uninstalling my IE 5.5. ... There were minor problems with both and I wound up uninstalling them again. ...
    (microsoft.public.security)
  • Re: IE Cant Connect
    ... I have just made Firefox my default browser but if I wanted to make ... Explorer my default browser how do I go about this. ... Under Internet ...
    (microsoft.public.windowsxp.general)
  • firstNode problems
    ... What it should do (and indeed, what it does do, in Internet Explorer) ... In Firefox, however, it shows a black box. ... firstChild and the childNode at index 0 do in Internet Explorer. ...
    (comp.lang.javascript)