Jump to content

Two boxes are optional and only show when the user clicks on the box


Recommended Posts

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.