I am passing one variable successfully
any body help me to pass two variables to ajax page

$.ajax({
type: "POST",
url: "fetch_st_name.php",
data: "sid=" + sid,
cache: false,
beforeSend: function() {
$('#display1').html('<img src="loader.gif" alt="" width="24" height="24">');
},
success: function(html) {

$("#display1").html(html);
}
});

I am passing one variable. data: "sid=" + sid,
i want to pass multiple variable
any body help me

Recommended Answers

var data = 'key='+ value + '&key='+ value;
or
var m_data = new FormData();
m_data.append( 'key', value);
m_data.append( 'key', value);

Jump to Post

if ur pbm is solved ....marked as solved

Jump to Post

All 5 Replies

var data = 'key='+ value + '&key='+ value;
or
var m_data = new FormData();
m_data.append( 'key', value);
m_data.append( 'key', value);

Thanx

if ur pbm is solved ....marked as solved

kk

data:{uid:id, name:uname},

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.