Master/Detail - Disable Click on button

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
johnberman
User
Posts: 210

Master/Detail - Disable Click on button

Post by johnberman »

I have a master detail relationship set up

on the master there is the button and if you hover over it the details come up - of course you can click on it - can I disable the click option so all you can do is hover and see the details

Regards
John B


mobhar
User
Posts: 11702

Post by mobhar »

Just inspect the element id, and then use jQuery code in Startup Script under Client Scripts section to disable onclick event, for example:

// adjust "the_element_id" to the actual element id
$("#<the_element_id>").removeAttr("onclick");


arbei
User
Posts: 9355

Post by arbei »

johnberman wrote:
I have a master detail relationship set up

on the master there is the button and if you hover over it the details come
up - of course you can click on it - can I disable the click option so all
you can do is hover and see the details

If you are talking about the "Preview" extensions and want to prevent the user from clicking the button and go to the Master/Detail List Page, you can remove the "href" attribute in Startup Script of the Master table.

For example:
$(".<Master Table Name>detail<Detail Table Name>").find("[data-action='list']").removeAttr("href");


Post Reply