Ajax request delimiters for data to be sent?

Pass an object instead of string for the data field: var url = "index. Php? Id=123&sid=321"; $.

Ajax({ type: "POST", url: "some. Php", data: { name: "John", url: url }, success: function(msg){ alert( "Data Saved: " + msg ); } }).

– Centurion Aug 13 '10 at 23:25 No, you don't need to do json_decode. JQuery will pass these fields as POST fields, and your PHP script will be able to read them separately, the same way as you usually read data from form posts - $_POST"name" and $_POST"url" – Fyodor Soikin Aug 13 '10 at 23:26 Thanks a lot! – Centurion Aug 13 '10 at 23:31.

Var url = 'index. Php? Id=123&sid=321'; $.

Ajax({ type: "POST", url: "some. Php", name: 'John', url: url, success: function(msg){ alert( "Data Saved: " + msg ); }); It would be better to pack all data with JSON as above, and build the URL server-side as part of whatever script you have handling this AJAX request.

Var url here is just an example , I need it to be sent to server, it can be something else for example var url = firstname&lastname. – Centurion Aug 13 '10 at 23:23 Fyodor Soikin's answer is the best way to deal with this situation – Michael Robinson Aug 13 '10 at 23:30.

Put your data in a JSON. Data: {id: '123', sid: '321'}.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions