views:

57

answers:

3

I have a php page with some functions to recieve POST data, with a page refresh, no AJAX.

Right now I have a form with hidden fields that contain my dynamic data that I send with JS like so: document.my_form.submit();

Is it possible to send the data without using a form?

Basically I want to send an array of URL's from a list with thumbnails, so my function loops over the list and pushes them in arrays.

A: 

Nope, you can only POST data via AJAX or a form.

robbrit
A: 

you can use get instead of post, but it sounds like the url will get pretty messy. if you aren't opposed to ajax, i would be happy to elaborate on the answer.

Orbit
mmm, GET is not really an option as I will go over the 256 character limit.
FFish
if the urls are the same, but with some id difference , you could just send the ids, and do the url construction on the server side.
Orbit
good thinking, but unfortunately my URL's are a bit random. I'll keep with the form I guess..
FFish
+1  A: 

2000 characters should be ok these days:

http://www.boutell.com/newfaq/misc/urllength.html

mplungjan
thanks for the correction and link!
FFish