Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript -- setting form action

Status
Not open for further replies.

jones54

Programmer
Sep 2, 2003
23
IE
Hi,

I am having trouble setting the form action in Javascript. I have tried it a few different ways but I am getting the error "Object doesn't support property or method:

document.SearchUser.action = '/AdminTools/jsp/private/deleteClientSearch.jsp';

document.forms[0].action = "/AdminTools/jsp/private/deleteClientSearch.jsp";

document.all('SearchUser').action = "/AdminTools/jsp/private/deleteClientSearch.jsp";

document.getElementById('SearchUser').action = "/AdminTools/jsp/private/deleteClientSearch.jsp";

My form is defined as follows:
<FORM METHOD="POST" NAME="SearchUser" >

I am using Internet Explorer 5.5.

I would greatly appreciate any ideas that anyone might have.

Many Thanks,
 
If you have a form element named "action", rename it to something like "myAction".

Hope this helps,
Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Hi Dan,

Many Thanks for that. I had another element on the form called action. When I renamed it - that fixed the problem.

Your speedy response saved my sanity!!

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top