This topic is locked

Conditinally Hiding <TR> in List Page

11/21/2017 1:40:05 PM
ASPRunner.NET General questions
S
swiersman author

Hi all,
I am having an issue in conditionally hiding a <TR> in the list page of my application.
Here is the code I entered in the LIST Page/JavaScript OnLoad Event:
var WebControl = Runner.getControl(pageid,'TypeServer');

if (WebControl.getValue()=='APPLICATION')

{

document.getElementById("WebServer").style.display = 'none';

}


TypeServer - is a select box where type server is selected.

If Type chosen = 'APPLICATION" then the <TR> field tagged as id="WebServer" is hidden.
I use this same code in the EDIT Page/JavaScript OnLoad Event and it works.
If I just enter the bracketed code: "document.getElementById("WebServer").style.display = 'none';" the field is hidden.
Can I do the above on a LIST page, if so is the code different from the edit page?
Many thanks,
Scott

admin 11/21/2017

We do not have an API that would allow you to do that via Javascript. However using Before Record Processed event you can do just that:

https://xlinesoft.com/asprunnernet/docs/before_record_processed.htm