AjaxHelper 0.4 Reference

Source: Internet
Author: User

You can read the articles below to get more intruductions about AjaxHelper:

Ajax-based MVC solution in. Net Environment
AjaxHelper example
Release of AjaxHelper0.3 and AjaxHelperExample2
Support for the AjaxHelper 0.4 of SPS, making it easier to develop a new WebPart without any need.

**************************************** **************************************** ********************
AjaxHelper 0.4 Reference
Copyright 2005 by Teddy <shijie. ma (at) gmail.com> (http://blog.teddy.cn)
Last Modified: 2005/06/20
**************************************** **************************************** ********************

Main Functions
--------------------------

1. function Updater (ajaxTemplate, output, params, onComplete)

Description:
Callback the specified UserControl, if needed replace the innerHTML of the element specified by output and call onComplete function. this function cannot be used in webpart.

Params:
AjaxTemplate [needed]: the UserControl's Name with relative path.
Output [optional]: the specified return element, this element must have innerHTML property, you can pass this param either the element id as string or the direct object ref.
Params [optional]: the params to be sent to ajaxTemplate.
OnComplete [optional]: custom function ref for dealing with the return content of this callback, in format like function (content ){}.

---

2. function Appender (ajaxTemplate, output, direction, params, onComplete)

Description:
Callback the specified UserControl, if needed append the element specified by output and call onComplete function. this function cannot be used in webpart.

Params:
AjaxTemplate [needed]: the UserControl's name with relative path.
Output [needed]: the specified return element, this element must have innerHTML property, you can pass this param either the element id as string or the direct object ref.
Direction [needed]: the position to append the content, the value can be one of "beforeBegin", "afterBegin", "beforeEnd" or "afterEnd ".
Params [optional]: the params to be sent to ajaxTemplate.
OnComplete [optional]: custom function ref for dealing with the return content of this callback, in format like function (content ){}.

---

3. function SerializeForm (form)

Description:
Seralize a form to the format like "param1 = v1 & param2 = v2 & param3 = v3 ...".

Params:
Form [needed]: the specified form name or form's object ref

---

4. function Inserter (element, direction, content)

Description:
Append the element with the specified content at position specified by direction.

Params:
Element [needed]: the specified base element to append to. property, you can pass this param either the element id as string or the direct object ref.
Direction [needed]: the position to append the content, the value can be one of "beforeBegin", "afterBegin", "beforeEnd" or "afterEnd ".
Content [needed]: the content to be appended.

---

5. function WebPartUpdater (ajaxTemplate, output, params, onComplete );

Description:
Callback the specified UserControl, if needed replace the innerHTML of the element specified by output and call onComplete function. this function can be used in webpart only.

Params:
AjaxTemplate [needed]: the UserControl's Name with relative path.
Output [optional]: the specified return element, this element must have innerHTML property, you can pass this param either the element id as string or the direct object ref.
Params [optional]: the params to be sent to ajaxTemplate.
OnComplete [optional]: custom function ref for dealing with the return content of this callback, in format like function (content ){}.

---

6. function WebPartAppender (ajaxTemplate, output, direction, params, onComplete)

Description:
Callback the specified UserControl, if needed append the element specified by output and call onComplete function. this function can be used in webpart only.

Params:
AjaxTemplate [needed]: the UserControl's Name with relative path.
Output [needed]: the specified return element, this element must have innerHTML property, you can pass this param either the element id as string or the direct object ref.
Direction [needed]: the position to append the content, the value can be one of "beforeBegin", "afterBegin", "beforeEnd" or "afterEnd ".
Params [optional]: the params to be sent to ajaxTemplate.
OnComplete [optional]: custom function ref for dealing with the return content of this callback, in format like function (content ){}.

---

Utility Functions
------------------------

1. function PeriodicalExecuter (callback, frequency)

Description:
Periodically Execut the specified callback function in the specified frequency.

Params:
Callback [needed]: the specified callback function.
Frequency [needed]: the specified frequency.

2. function $ ()

Description:
Return the element list specified by the id names of these elements

Params:
The params 'count can be one or more, must be the id names of your needed elements.

3. String. lTrim
String. rTrim
String. trim
String. endsWith
String. startsWith
String. format
String. removeSpaces
String. removeExtraSpaces
String. isEmpty
String. isEmail
String. isAlphaNumeric
String. encodeURI
String. decodeURI
Array. indexOf
Array. exists
Array. queue
Array. dequeue
Array. removeAt
Array. remove
Array. clear
Array. addArray

Description:
These functions is like theirs in c # and vb.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.