Element ID

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

Element ID

Post by johnberman »

Hi

I still struggle with element ID

The following is an answer to my question

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");

So I inspected the code

<td class="ewListOptionBody" style="white-space: nowrap;" data-name="detail_event_comments">
<span class="meteor_events_detail_event_comments" id="el1_meteor_events_detail_event_comments">
<div title="" class="btn-group" aria-describedby="popover754492" data-original-title="">
<a class="btn btn-default btn-sm ewRowLink ewDetail" href="event_commentslist.php?showmaster=meteor_events&fk_event_id=85837" data-action="list">Event Comments<span dir="ltr">(4)</span></a></div>

and am assuming that the element_id is this - el1_meteor_events_detail_event_comments

and so tried
$("#<el1_meteor_events_detail_event_comments>").removeAttr("onclick");

and

$("#el1_meteor_events_detail_event_comments").removeAttr("onclick");

but neither seemed to work so maybe my identification of the element_id is just wrong

John B


mobhar
User
Posts: 11660

Post by mobhar »

For your case above, then simply try this instead:

$(document).ready(function() {
$("a.ewDetail").removeAttr("href");
});


johnberman
User
Posts: 210

Post by johnberman »

Thank You


Post Reply