cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HTML Tags

rajalcmg
Explorer
0 Kudos

In SAP CRM Web UI, My requirement is to have a static length for buttons and trigger an event based on a mouseclick on the button. When using THTML tag buttons, i found it to be varying with the length of the text, so i have used HTML tag buttons. The issue here is, I am unable trigger an event using HTML tag buttons. I have defined the event handler and all the code exists to handle the event, but unfortunately only the events raised by THTML tags are getting triggered.Kindly provide an idea to way forward. Please see below for existing code.

.htm page code

------------------------

<input type="button" id="DISPATCHUNITS" value="Dispatch (Additional) Units"  style="height:23px; width:200px"> </input>

<em onclick="QUICKACTION"></em>

Method DO_HANDLE_EVENT

---------------------------------------------

method DO_HANDLE_EVENT.

* Eventhandler dispatching

     CASE htmlb_event_ex->event_server_name.

*     Added by wizard

       WHEN 'QUICKACTION'.                                   "#EC NOTEXT

         EH_ONQUICKACTION( htmlb_event    = htmlb_event

                     htmlb_event_ex = htmlb_event_ex ).

       WHEN OTHERS.

     ENDCASE.

   endmethod.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member621721
Discoverer
0 Kudos

Solve <a class='closebtn' href='javascript:void(0)'> blogger page comments

www.ashbab.com

former_member621721
Discoverer
0 Kudos

Solve <a class='closebtn' href='javascript:void(0)'> blogger page comments

<a href="https://www.ashbab.com/">هو للمعلومات</a>

<a href="https://www.ashbab.com/search/label/%D8%A7%D8%AA%D8%B5%D8%A7%D9%84%D8%A7%D8%AA">الاتصالات</a>

<a href="https://www.ashbab.com/search/label/%D8%A7%D8%B3%D9%84%D9%88%D8%A8%20%D8%AD%D9%8A%D8%A7%D8%A9">اسلوب حياة</a>

<a href="https://www.ashbab.com/search/label/%D8%A7%D9%84%D8%B9%D8%A7%D8%A8">العاب</a>

<a href="https://www.ashbab.com/search/label/%D8%A8%D8%B1%D8%A7%D9%85%D8%AC">برامج</a>

<a href="https://www.ashbab.com/search/label/%D8%AA%D8%B9%D9%84%D9%8A%D9%85">تعلم</a>

<a href="https://www.ashbab.com/search/label/%D9%87%D9%88%D8%A7%D8%AA%D9%81">موبايل</a>

<a href="https://www.ashbab.com/search/label/%D9%81%D9%88%D8%AF%D8%A7%D9%81%D9%88%D9%86">فودفوان</a>

<a href="https://www.ashbab.com/search/label/%D8%B5%D8%AD%D8%A9%D8%8C%D8%AC%D9%85%D8%A7%D9%84">صحة وجمال</a>

<a href="https://www.ashbab.com/search/label/%D8%A7%D8%B3%D9%84%D8%A7%D9%85%D9%8A%D8%A7%D8%AA">اسلاميات</a>

hongyan_shao
Active Contributor
0 Kudos

Hi,

There are two facts here. First, tag thtmlb:button does not have control over the length, it will be changed based on the text length. And unfortunately we do not have a length attribute for this tag. Maybe it is possible to control the length using the CSS. But it will effect all other buttons whoever used the same class id. Second, the onclick will trigger the event, it is not simply taken from html.

Take one button in standard for example, it shows


<a href="javascript:void(0)" class="th-bt th-bt-text-em" onclick="thBtMgr.click(this);return htmlbSL(this,2,'C3_W18_V19_V21_Search:search','0')" onmousedown="thBtMgr.press(this,event);" onfocusout="thBtMgr.unpress(this);" onfocus="thSaveKbFocus(this);" oncontextmenu="return false;" ondragstart="return false;" id="C3_W18_V19_V21_Search" title="Search Account"><span class="th-bt-span"><b class="th-bt-b">Search Account</b></span></a>

Here you may notice the event is not the simple event name.

Maybe you can think of using the image tag instead? So that you won't have the problem regarding length, and you can have CL_THTMLB_* class to generate the event for you?

Hongyan