Solved

Passing additional parameter to $(post)

Posted on 2009-07-09
2
530 Views
Last Modified: 2013-11-08
I have a simple(stupid) question.  I'm passing along the contents of form submit via json.  I'm storing the contents in an array (params).  I want to also add an additional parameter to what I'm passing, a value that isn't part of the form.

A speedy response would be appreciated!
var params = $('form :input').serialize();
 

$.post (

  url,

  params,

  myFunction(json) {
 

}

):

Open in new window

0
Comment
Question by:aznprncritic
2 Comments
 

Author Comment

by:aznprncritic
ID: 24818904
Speedier!
0
 
LVL 16

Accepted Solution

by:
anoyes earned 300 total points
ID: 24967102
You might be able to do:

var params = $('form :input').serialize();

params=params+'newparam'='value'

Open in new window

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now