This topic is locked

View Page question

10/20/2010 7:36:22 AM
PHPRunner General questions
M
macskafogo author

Hi !
If the field is empty I would like to hide this row.

I use this code View Page:Javascript Onload event:
var ctrlCODE = Runner.getControl(pageid, 'CODE');

if (ctrlCODE.getValue()== ""){

document.getElementById("code").style.display="none";

}else{

document.getElementById("code").style.display="table-row";

};
Nothing happens. What's wrong ?

Please help.

Thanks

Sergey Kornilov admin 10/20/2010

Javascript API is designed to work with edit controls (those that are on Add/Edit pages).
Here is an example of how you can do this on View page:

http://xlinesoft.com/phprunner/docs/hide_controls_on_add_edit_pages.htm