tadam logo
Did you find an error in the text?
Select this with mouse and press
Ctrl + Enter
Xhtml.co.il Check Spelling
Orphus system

Map

The map type is used by the AJAX function to hold the data of a request. This type could be a string, an array<form elements>, a jQuery object with form elements or an object with key/value pairs. In the last case, it is possible to assign multiple values to one key by assigning an array.

{'key[]':['valuea','valueb']}

becomes on the server-side (in PHP):

$_REQUEST['key'][0]="valuea";
$_REQUEST['key'][1]="valueb";

in Rails or Merb:

params[:key] = ["valuea", "valueb"]
Was this information helpful?
   

Comments