Refreshing EditRecord does not trigger jQuery document ready function

Refreshing EditRecord does not trigger jQuery document ready function

  
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 ?
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
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 .... ?
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