Ajax Form Document

Method Summary
Method Attributes Method Name and Description
 
getRandUrl(String)
Set a url string with random data to enforces refreshing the request of ajax
 
setWebData(String, String, String, Object)
Set the form's data requested from server side via ajax
 
submit(Function, Object, String)
Send the form's data via ajax
Method Detail
getRandUrl(String)
Set a url string with random data to enforces refreshing the request of ajax
Parameters:
String
url The original url
Returns:
String The random url

setWebData(String, String, String, Object)
Set the form's data requested from server side via ajax
Parameters:
String
fromUrl The address you wanna request
String
toUrl The new action attribute of the form(can be null)
String
useJson The json's name form the server(can be null)
Object
options The addition data you can add to form's data(can be null)

submit(Function, Object, String)
Send the form's data via ajax
Parameters:
Function
callback The response function called when ajax request is success
Object
options The options add to ajax's request parameters(can be null)
String
type Ajax's request type,can be 'xml','text','json'(can be null)

Anthor Open Project