This topic is locked
[SOLVED]

 Upgrade to 5.3 - Javascript methods stopped working

2/16/2011 5:49:58 PM
PHPRunner General questions
E
electromotive author

[Note:this was split out of topic http://www.asprunner.com/forums/topic/16381-search-doesnt-work/ ]
In process of upgrading from PHPR5.2 to 5.3, and testing is going reasonably well. Almost there ...
However, some Javascript is not working quite the same as 5.2.
I have a list page with has both inline and normal edit enabled. Only two fields are enabled for editing in the inline mode, but that seems irrelevant.
What I was trying to do was use the setFocus method to put the cursor in the correct field (exactly as from the help) on the inline-edit (list). This works for me on 5.2 but not on 5.3 (on both the normal and in-line edits).

var ctrl = Runner.getControl(pageid, 'myfield');

ctrl.setFocus(); //ok on 5.2 but not on 5.3
or
var tName = 'mytable';

var ctrl = Runner.controls.ControlManager.getAt(tName, pageid, 'myfield');

ctrl.setFocus(); // ok on 5.2 but not on 5.3


Same environment, same code, works with the 5.2 generated scripts, but not on the 5.3 generation.

Not just the setFocus, but other methods don't work either.

Either on windows or linux hosts. Or IE or FF.
Anyone have advise for me?
[Note: thanks for the mod rewrite suggestion]

Sergey Kornilov admin 2/17/2011

Impossible to answer without seeing your app.
You need to see if there are any Javascript errors on the page that prevent this code from working. Check 'How to troubleshoot Javascript errors using Firebug' tutorial at http://xlinesoft.com/phprunner/php-database.htm

E
electromotive author 2/17/2011



Impossible to answer without seeing your app.
You need to see if there are any Javascript errors on the page that prevent this code from working. Check 'How to troubleshoot Javascript errors using Firebug' tutorial at http://xlinesoft.com/phprunner/php-database.htm



Yep there is a javascript error:
ctrl.setFocus is not a function

Sergey Kornilov admin 2/17/2011

How do you want us to help?

E
electromotive author 2/18/2011



How do you want us to help?



Works ok on the standard edit.

But still get same error on inline edit.