Click to See Complete Forum and Search --> : Using the POST method without a form


cbentley
09-21-2005, 02:47 PM
I have some data in a webpage that needs to be reloaded so the server side code can do its work. I was reloading the page with a javascript line...document.location.href="myPage.asp?var=blah&var2=blah";
But on some occassions the string ends up being huge and the GET method doesn't receive the whole input.

Is there anyway to reload the page using either the POST method or a way to send more info than the GET method allows? The only way I know how to use POST is to use a form but I can't put this data into a form.

Thanks.

ray326
09-21-2005, 09:59 PM
but I can't put this data into a formSure you can. If you can put it into a query string you can put it into a form.

cbentley
09-22-2005, 10:52 AM
I have a selecton list inside a form with my data in it. But then the user can click and drag the info to rearrange it. So when the user clicks submit the data is not the same as it is in the form. The form is submitted the same way as it was before the user moved things around.

I use document.form.item.options[int].value to arrange the selection list and to create my string but this does not get submitted with the form. I have hidden fields that get submitted. I have tried changing the values of the hidden fields when I change the look of the selection list but it still doesn't work.

toicontien
09-22-2005, 12:20 PM
You'll have to post the full HTML, CSS and JavaScript used. Then we can truly help you.

felgall
09-22-2005, 03:36 PM
The form equivalent of a query string uses all HIDDEN fields except the submit button. No selection list should exist.