![]() |
Sergey Kornilov admin 3/18/2010 |
I have good news. There is already Javascript API in PHPRunner 5.2 that allows to access form fields and we use it for all internal needs. Updated manual will be available shortly. // table name |
E
|
electromotive author 3/21/2010 |
This is really great news. |
A
|
aalekizoglou 3/23/2010 |
This is really great news. I tried your code snippet using the cars database, adding country and state. Works fine. I'll eagerly await some documentation, and figure out how to test fields using RegExp, setfocus, change field background & font color, etc etc. I see some functions defined in runnerJS\Control.js such as setEnabled, setDisabled, setFocus, setValue, getValue, isEmpty and addStyle. An example of using addStyle would be quite useful. This feature will give a good user experience. Thanks again.
|
R
|
rodny 3/24/2010 |
PHPR supports server-side validations quite well, however support for client-side validation could still be improved. Client-side validations provide context-sensitive guidance, can dynamically tab between fields, verify if the format is correct while you type, shift case as you type, add punctuation, depending on certain fields make other fields read-only or "fold" sections which are irrelevant, change the background color or font to highlight while you are filling out a form, provide context sensitive hints (hovertext), etc., all without requiring a page refresh from the server. It could support an intelligent interface to a barcode scanner (which appears like keyboard input) by ensuring that the scanned code goes into the correct field. Lots of good reasons to use client-side validations and custom javascript.
|
E
|
electromotive author 3/26/2010 |
Is it possible that you post some examples of this codes? A step by step tutorial of how to make work of things like "dynamically tab between fields, verify if the format is correct while you type, shift case as you type, add punctuation, depending on certain fields make other fields read-only"
|
![]() |
Sergey Kornilov admin 3/26/2010 |
R
|
rodny 3/28/2010 |
I have good news. There is already Javascript API in PHPRunner 5.2 that allows to access form fields and we use it for all internal needs. Updated manual will be available shortly. Here is an example of how it works. This code can be added to Javascript event OnLoad. This code enables States dropdown if US selected as a country. // table name
|
E
|
electromotive author 3/28/2010 |
Hi, I'm trying to use the code mentioned but when I click the Check Syntax button, I get the error message syntax error, unexpected T_VAR in line 2 Why is that? Can some body help me please. Rodny <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=48850&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
|
E
|
electromotive author 3/28/2010 |
Here it is: http://xlinesoft.com/phprunner/docs/javascript_api.htm
|
J
|
Jane 4/2/2010 |
Hi, ctrlCountry.on('change', function(e){ |