Change form.action

Hello!

I want to change the form.action with Java-Script.
This is my code:
-----------------------
window.document.fileform.action = 'upload.php';
-----------------------

With netscape everything works fine.
MS-IE doesn't change the action.

What's the problem?
Please help me!
Thanks

Comments

  • it should work the same with Explorer.

    Make sure the name of your form is fileform (case sensitive)
    something like this should probalbly do it...
    de default submit button would open default.php and the extra button would call the javascript function that changes the action and also submits the form.

    make sure you don't place the second button within the form but place it outside or else it doesn't see your javascript function. I don't know why this is, but yesterday I had the same problem... I found out that you should not call the javascript from within the form...

    [code]











    [/code]

    : Hello!
    :
    : I want to change the form.action with Java-Script.
    : This is my code:
    : -----------------------
    : window.document.fileform.action = 'upload.php';
    : -----------------------
    :
    : With netscape everything works fine.
    : MS-IE doesn't change the action.
    :
    : What's the problem?
    : Please help me!
    : Thanks
    :

    ;-)
    -mac-
    mailto:programmersheaven@mac-doggie.nl
    the Netherlands...


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion