boomers527 Posted January 4, 2017 Share Posted January 4, 2017 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. } }, 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. Quote Link to comment https://forums.phpfreaks.com/topic/302868-two-boxes-are-optional-and-only-show-when-the-user-clicks-on-the-box/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.