I am creating a website where a user enters requested information. Two boxes are optional and only show when the user clicks on the box. These optional boxes to fill in are macAddress and deviceAddress. I had a problem having them show when the user goes to check on the submitted requests on another page. They would have to click on the boxes again to look at them. Now I am able to show the user, but on the initial page to submit the information, the boxes show up on their own without being checked. Any advice on logic or help is appreciated. Thank you.
[php]
onLoadSuccess:function(data)
{
var fields=$(this).datagrid(‘getColumnFields’);
for(var x=0; x<fields.length; x++)
{
$(this).datagrid(‘autoSizeColumn’,fields[x]);
if(x==2) break;
}
if(isAuthorized())
{
$(this).datagrid(‘showColumn’,‘action’);
//added these next 2 lines to have data pop up without user having to click on it to show
$(this)datagrid(‘showColumn’,‘macAddress’);
$(this)datagrid(‘showColumn’,‘deviceAddress’);
}
else
{
$(this).datagrid(‘hideColumn’,‘action’);
//I tried to duplicate the above line for mac and device and it did not work.
}
},
[/php]