Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Joop Stringer
4
Views
3
Comments
Refreshing EditRecord does not trigger jQuery document ready function
Question
Hmmmm anybody noticed this already ?
I've got an edit record where, with help of piece of jQeury, only allow numeric input in some fields (telephone/fax)
When I do an AJAX refresh, the document ready function is not triggered and so the piece of code is not executed .... and they can fill in letters and numbers again ....
The jQuery piece is in the layout_normal because there are more global settings there
Any idea how to solve this ?
João Rosado
Staff
Hi Joop,
You need to put the call of your javascript inside the part you are refreshing if you want it to run again.
jQuery.Ready is a not like other binds ...it cant even be triggered manually.
Edit: Another option is calling the RunJavascript method after the ajax refresh. It has the exact same effect.
Regards,
João Rosado
Joop Stringer
João,
Found out that refreshing only certain inputwidgets works perfect instead of refreshing the whole edit record...
But can you explain the RunJavaScript part please .... ?
João Rosado
Staff
Hi Joop,
Its a method in the HttpRequestHandler.
It sends a piece of javascript to be executed in the browser. Also it respect the order of ajax operations in the flow:
For example: If it's used in the flow after an ajax refresh then it runs after the widgets are rendered.
It has the exact same behavior as having an unescaped javascript expression in the page with and doing an ajax refresh of the expression. ...but it's alot cleaner.
Regards,
João Rosado
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...