TunaFFish
TunaFFish

Reputation: 11302

sending data to same PHP page from Javascript, no AJAX or forms

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.

Upvotes: 0

Views: 508

Answers (3)

mplungjan
mplungjan

Reputation: 177965

2000 characters should be ok these days:

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

Upvotes: 1

Brandon Frohbieter
Brandon Frohbieter

Reputation: 18139

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.

Upvotes: 0

robbrit
robbrit

Reputation: 17960

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

Upvotes: 0

Related Questions