This topic is locked

Auto activating inline edit on list_page

2/26/2009 10:22:07 AM
PHPRunner General questions
yarebbel author

Hi there,
I am using phprunner 5.0 build 766, with this project i have a users table. Users are able to edit only their own data, so only their own record.

For the users to edit their data i setup the following;
list_page showing 1 record per page, vertical layout, automatically going into inline-edit mode when shown.
To control going into inline-edit i added the following to my list_page, and made sure it was last before the </BODY> tag.
<script>$("a#ieditlink1").click();</script>
The result is that i get a page error when viewing the page stating "inlineEditing not defined".
Could you help me on this please.
Regards,

Alexey admin 2/27/2009

Hi,
this happens because your code is executed before the inlineedit.js file is loaded.

Ttry modify your code this way:

<script>setTimeout('$("a#ieditlink1").click();',1000);</script>
We'll add an easier way to start inline edit in the next version of PHPRunner.

yarebbel author 2/27/2009

Thanks, that worked.
My problem was that I use js to update value_Field.value values in the document and there aren't any if the page isn't in edit mode. It would help to know when you're in edit mode anyway, i couldn't find any indication for it.
Regards,

Sergey Kornilov admin 2/27/2009

You can use the following to see if first record in inline edit mode:

if(document.getElementById('save_1')!=undefined)