JavaScript Scripts

JavaScript can be used for good and for bad. Here are some useful code snippets.

(back to Programming)

Javascript: POST Variables to Forms

It’s possible, and in fact very easy, to send POST variables with Javascript. I’m posting it here because I had some trouble coming up with a solution.

The only thing you have to do is to put an HTML form on a site, and use Javascript to submit it. If you don’t want the form to be visible, you can have the fields hidden. Here is a sample HTML code:

Use this JS function to submit the form:

function jsPost() {
  document.theForm.submit();
}

It can be called in any way, for instance in a hyperlink:


Submit

Or as an event, like on body load:



add ringtone cellular link2am mp3 breathefamily ringtones addamsmp3 6cycle upside mind downable mp3 dvd 504credit 1stadvantage union6buy levitra genericbody mp3 gloves 75547 Mapbig movie titsmovies porn childrensex movies pantyhose freemovie trailers gaymassive cock moviesperfect movies fuckmovie the rent musicalmovies summer cummings Map

FireStats iconAnvänder FireStats