Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Passing additional parameter to $(post)

Posted on 2009-07-09
2
Medium Priority
?
546 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:aznprncritic
ID: 24818904
Speedier!
0
 
LVL 16

Accepted Solution

by:
anoyes earned 1200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
Suggested Courses

610 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