Click to See Complete Forum and Search --> : How to make a GET request from Javascript?


kothapalli
08-19-2003, 02:30 PM
Hi,

We can make a POST from Javascript as follows:

document.formName.action="TaskEditor?param1=value1";
document.formName.submit();

when my form is defined as follows:
<FORM name="formName" METHOD="POST">

But when I make the GET request as foloows by changing ,
document.formName.action="TaskEditor?param1=value1";
document.formName.submit();

with my form definition as follows:
<FORM name="formName" METHOD="GET">

it does not work.

The param1 is not going with the request . I'm testing on IE 6.0. Any ideas?

Kothapalli.

AdamGundry
08-19-2003, 03:07 PM
It's probably because the GET request from the form is overriding the parameter you are passing on the form's action. You should be able to create a hidden input field, assign it the value, and it will then be passed on the URL.

Adam