AjaxFormSubmit ve AjaxPageLoad


Function: AjaxPageLoad

AjaxPageLoad function is used to call and load isplay and list pages.

Variable.
Value
>Url
Address of the loaded-recalled page [Required]
MessageBoxld
The ID of the Div from which the called page will be loaded. [Required]
showError
It ensures whether or not to see this in errors caused by CF. If you give 1, it will be shown if there is an error, if you do not enter it or if you enter 0, when an error occurs, inside the div; "WorkCube Error! Contact system administrator." text is coming, the reason we added it is this, when we call the page with AjaxPageLoad, if there is an error in CF, we could not see it normally,the page you called inside the div to see it, you had to call the same page through the browser and see the error, we added this parameter to prevent this, if there is an error, you write it And you can see what the error is without any effort, in the same page. But even if the debug is turned off, if it is left as 1, all errors are displayed on the screen, so if you encounter an error, make 1, see the error, otherwise it should be left as 0. [Not required]
watingMessage
The waiting message is "Loading" as standard, you can change this message if you want. [Not required]


Note: Where AjaxPageLoad is used, there must be a 

statement in the called page, otherwise an error occurs on the page and the design cannot be adjusted because it prints debug.

Model :    

var page =
'#request.self#fuseaction=myhome.popupajax_my_company_helps&
cid=#attributes.cid#&maxrows=#attributes.maxrows#
';AjaxPageLoad(page,'LIST_COMPANY_HELP');


*/ LIST_COMPANY_HELP brings the page defined in the page variable into the div with the id. /*

Function: AjaxFormSubmit
AjaxFormSubmit function is used when you want to submit a form with ajax.

Variable
Value
formName
You have to enter the name of the form you will submit.[Required]
messageBoxId
The id of the div that indicates where to display the message you will show to the user after submitting the form.[Required]
showError
It is used as it is used in AjaxPageLoad. [Required]
watingMessage
The waiting message is "Saving" as standard, you can change this message if you want. [Required] 
successMessage
When the process is completed, the message to be displayed inside the div. "Saved" is displayed as standard. You can enter any text you want.[Not required]

Model:

**You need to write the onclick of the button that will perform the Submit function.**

These functions can be used in every operation on Workcube such as add, update, list, display, delete.


Feedback

Did you find this content helpful?