Posted by The Natural Philosopher on 10/06/73 12:00
Michael Fesser wrote:
> .oO(Manuel Lemos)
>
>> on 01/14/2008 11:39 PM trpost@gmail.com said the following:
>>> I tried the Class and it looks to be able to send POST data to a page
>>> and request back the results. I am looking to actually goto the page
>>> as if you had clicked on the link. I basically created an app that
>>> sometimes tries to send data to a page that exceeds the max length
>>> allowed in the URL. What are options for getting around that limit. I
>>> could see using a form if I had just one link, but I have hundreds and
>>> can't think of a way to just send the data from the link I click on if
>>> I used a form.
>> I think the limit is in the browsers, something like 255 characters. So
>> I think you can submit a GET request using that class to an URL without
>> that limit.
>
> There are also buffer limits in the web servers. For sending large
> amounts of data to a script POST is the correct way.
>
> Micha
You can do this with javascript.
Essentially use the onclick() stuff to poke the right data into a HIDDEN
variable, and POST that to the form
So you have somewhere
<form method="post">
<INPUT type="hidden" name="postvariable1" id="p1" value="">
<div onclick="do_my_stuff("a very long string")";>Click here to go
somewhere else
</div>
</form
and a javascript..
<script>
function do_my_stuff (p)
{
getElemntById[['p1']=p;
document.form[0].submit();
}
</script>
Syntax is guaranteed to be wrong, but thats the principle
[Back to original message]
|