Htmlb:button  onClick event

Hi experts I'm using follwoing code  for htmlb :button
          <htmlb:button       id            = "myButton2"
                            text          = "<%= v_save %>"
                           tooltip       = "<%= v_save %>"
                           onClick       = "approveClick"
                           design        = "emphasized"
       />
and in
do_handle_event  I'm using followin code
DATA : button_event TYPE REF TO cl_htmlb_event_button,
         event1 TYPE REF TO cl_htmlb_event.
  event1 = cl_htmlb_manager=>get_event(  runtime->server->request ).
  CASE event1->server_event.
    WHEN 'approveClick'.
      button_event  ?= event1 .
<   some code >
ENDCASE.
when i clicked the button it is not going into do_handle_event
I'm unable to capture onclick event of button .I tried it by keeping some break points .But couldn't be ableto capture it
Here I'm using MVC pattern .When one check box clicked in view of another controller  the page which contains this button will be displayed.Do i need to write any additional code for it

There are 2 kind of break-points.
1. Session break-points - This will wok only to debug normal ABAP codes.
2. External break-points - This will help you to debug BSP/Webdynpro application.
Set the external-break point to figure out whether its triggering the events or not.
<b>
To set the external Break-points:</b>
Before settings the external-break-point, you need to Active External break-point for HTTP. YOu can find this option in
SE80, in
Utilites--> Break-point/External break-point or Utilites--> External break-point --> Set External break-point
or if you dont find, then
utilities-->setttings -> ABAP Workbench -> look at the debugger tab
& find the external Debugging check box or External Debugging user ID. Give SAP User ID
Also have a look at this..
http://help.sap.com/saphelp_nw2004s/helpdata/en/17/00ab3b72d5df3be10000000a11402f/frameset.htm
<i>* Reward each useful answer</i>
Raja T
Message was edited by:
        Raja Thangamani

Similar Messages

  • Javascript Submit button onclick event handler

    Hi,
    I am having trouble getting the onclick event handler of a form to execute when the button is pressed. I am trying to open a page in a new window depending on if the user selects that option in a checkbox.
    There is one form(id='graphform') and 2 submit buttons, each with a checkbox before it. I want the new window to open only iuf the right checkbox and matching submit button has been checked.
    One of the checkbox/button pair: The onclick="checkWindow('w1','graphform');" is never getting called.
    <input type="checkbox" id="w1" name="win1" style="margin-right: 10px" value="window"  onclick="javascript:document.gform.win1[0].checked = true;"><a style="margin-right: 10px">Graph in new window</a>
    <input type="submit" value="Create graph" onmouseover="this.form.cumulat.value='0';this.form.graphGroup.value='Consumption'; document.getElementById('hintSubmitStop').value='1';" onclick="checkWindow('w1','graphform');" onmouseout="document.getElementById('hintSubmitStop').value='0';" /></td></tr>Javascript window opener:
    function checkWindow(win1, str){
              var formObj = document.getElementById(str);
         var checkBoxObj = document.getElementById(win1);
         if(checkBoxObj1.checked == true){
                   formObj.target = "_blank";     
                   formObj.action = "graphDisplayFrame.jsp";     
         else if(checkBoxObj1.checked == false){
                   formObj.target = "_self";
                   formObj.action = "graphDisplay.jsp";
    }Any suggestions?
    J

    You're storing the value in "checkBoxObj" and in the next line you use different variable name as "checkBoxObj1".
         var checkBoxObj = document.getElementById(win1);
         if(checkBoxObj1.checked == true){
    instead of "true', try      if(checkBoxObj.checked == 1){

  • Aps:button onClick event in Visual web part only fires first time - SharePoint 2013

    Below is my markup from ascx file
    <asp:Button ID="exporttopdf" runat="server" Text="Export To PDF"/>
    C# code for button on click
    protected void Page_Load(object sender, EventArgs e)
    exporttopdf.Click += new System.EventHandler(this.exporttopdf_Click);
    protected void exporttopdf_Click(object sender, EventArgs e)
    if (Page.IsPostBack)
    try
    using (MemoryStream stream = new MemoryStream())
    PdfPCell cell;
    SPList list = SPContext.Current.Site.OpenWeb().Lists[this.ListName];
    BaseColor rGBColor = WebColors.GetRGBColor("#AFAECE");
    PdfPTable element = new PdfPTable(2)
    TotalWidth = 300f,
    LockedWidth = true
    float[] relativeWidths = new float[] { 1f, 2f };
    element.SetWidths(relativeWidths);
    element.HorizontalAlignment = Element.ALIGN_MIDDLE;
    element.SpacingBefore = 20f;
    element.SpacingAfter = 30f;
    if (this.PdfHeading != null)
    cell = new PdfPCell(new Phrase(this.PdfHeading));
    else
    cell = new PdfPCell(new Phrase(this.ListName));
    cell.Colspan = 2;
    cell.Border = 0;
    cell.Padding = 4;
    cell.BackgroundColor = rGBColor;
    cell.HorizontalAlignment = 1;
    element.AddCell(cell);
    Document document = new Document(PageSize.A4, 25f, 25f, 30f, 30f);
    PdfWriter instance = PdfWriter.GetInstance(document, stream);
    document.Open();
    document.AddAuthor("Place Holder");
    document.AddCreator("Place Holder");
    document.AddKeywords("Place Holder");
    document.AddSubject(this.ListName);
    document.AddTitle(this.ListName);
    instance.Info.Put(new PdfName("Producer"), new PdfString("Place Holder"));
    PdfContentByte directContent = instance.DirectContent;
    string[] separator = new string[] { ";", "," };
    string[] strArray2 = this.ViewFields.Split(separator, StringSplitOptions.None);
    new StringBuilder().Append(this.ListName + "\n");
    foreach (string str in strArray2)
    PdfPCell cell2 = new PdfPCell(new Phrase(str))
    Border = 0,
    Padding = 4,
    HorizontalAlignment = 1
    element.AddCell(cell2);
    if (str != "Modified By" && str != "Created By")
    PdfPCell cell3 = new PdfPCell(new Phrase(SPContext.Current.Item[str].ToString()))
    Border = 0,
    Padding = 4,
    HorizontalAlignment = 1
    element.AddCell(cell3);
    else
    string[] separatorc = new string[] { "," };
    string[] strArray3 = SPContext.Current.Item[str].ToString().Split(separatorc, StringSplitOptions.None);
    PdfPCell cell3 = new PdfPCell(new Phrase(strArray3[3].ToString().Substring(8).Replace(@"\\", @"\")))
    Border = 0,
    Padding = 4,
    HorizontalAlignment = 1
    element.AddCell(cell3);
    PdfPCell cell4 = new PdfPCell(new Phrase("Footer"))
    Colspan = 2,
    Border = 0,
    Padding = 4,
    BackgroundColor = rGBColor,
    HorizontalAlignment = 1
    element.AddCell(cell4);
    document.Add(element);
    document.Close();
    instance.Close();
    stream.Close();
    HttpContext.Current.Response.Clear();
    HttpContext.Current.Response.ContentType = "pdf/application";
    string filename = SPContext.Current.Item["Title"].ToString() + ".pdf";
    HttpContext.Current.Response.AddHeader("content-disposition", "inline;filename=" + filename);
    HttpContext.Current.Response.OutputStream.Write(stream.GetBuffer(), 0, stream.GetBuffer().Length);
    HttpContext.Current.Response.End();
    catch (Exception exception)
    SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory("Export To PDF", TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, exception.Message, new object[] { exception.StackTrace });
    else
    HttpContext.Current.Response.Write("<script language=javascript>alert('ERROR');</script>");
    it works fine first time but does not do anything from second.
    any advice?

    Hi,
    Please try to the code snippet as below:
    VisualWebPart1.ascx:
    <asp:Button ID="exporttopdf" runat="server" Text="Export To PDF" OnClick="exporttopdf_Click"/>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    VisualWebPart1.ascx.cs:
    protected void Page_Load(object sender, EventArgs e)
    protected void exporttopdf_Click(object sender, EventArgs e)
    Label1.Text = System.DateTime.Now.ToString();
    If the code still do not work from second, I suggest you debug your code and check whick line of code occur the error.
    More information:
    http://social.msdn.microsoft.com/Forums/office/en-US/94931a08-f204-4d30-a230-f468815a76e8/export-aspnet-gridview-to-pdf-from-visual-webpart?forum=sharepointdevelopmentprevious
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Unable to capture onClick event of htmlb:image in a controller

    Hi,
    I am trying to capture onClick event of an htmlb:image (which is present in my view) in DO_HANDLE_EVENT method of my controller.
    Surprisingly, when I click the image, page does refreshes. But the event in not captured in do_handle_event method. Control never reaches that method. Whereas if I put onClick event of a button, it is easily captured in do_handle_event method.
    Ex. code in my view is:
    <%@page language="abap"%>
    <%@extension name="bsp" prefix="bsp" %>
    <%@extension name="htmlb" prefix="htmlb"%>
        <htmlb:image id      = "searchimg"
                     src     = "consvalue.jpg"
                     onClick = "search"  />
        <htmlb:button id="searchbutton" onClick="search"
                                     text="Event Test"/>
    Now, the button event is captured, but not the image event.
    Any idea why this might be happening?
    Regards,
    Kaushal

    Hi Kaushal,
    are image and button enclosed by <htmlb:form> ?
    Please post your of do_handle_event, where you look for the event.
    Regards,
    Sebastian

  • HTMLB- Button Event CASE Dyn Nav problem

    Hi,
    I am prototyping a solution in BSP which has a page with two buttons at the bottom, a BACK button and a SUBMIT button which both send the User to different pages, and I can't make the re-directs work.
    I am trying to stick to HTMLB and not get lazy and use HTML.
    I have a page call it page1.htm, at the bottom there is a submit button and back button with htmlb code as follows:
    <htmlb:button       text         = "Back"
                        onClick      = "event_1" />
    <htmlb:button       text         = "Submit Request"
                        onClick      = "event_2" />
    in the EVENT HANDLER for the OnInputProcessing Event I have the following CASE statement:
    CASE event_id.
      WHEN 'event_1':.
      navigation->goto_page( 'default.htm' ).
      WHEN 'event_2':.
      navigation->goto_page( 'submitresult.htm' ).
    ENDCASE.
    the idea is that when the BACK button is pressed the OnInputProcessing event handler will pick this up and using the value of the EVENT_ID which can be either event_1 or event_2 the CASE statement will re-direct the User to the correct page.
    Problem -> it doesn't work.
    Does anyone have any ideas where I am going wrong.
    Thanks for your time,
    Milan.

    Hallo Milan, (interesting name, English?)
    Somehow we are just overlooking something. I quickly built a very small cut-and-paste example.
    Create a new BSP application, and add into it three pages called page1.htm, page2.htm and page3.htm. The source is below. (Note all three has the same event handler:).
    <b><u>onInputProcessing for all three pages</u></b>
    DATA: event TYPE REF TO if_htmlb_data.
    event = cl_htmlb_manager=>get_event_ex( request ).
    IF event IS NOT INITIAL AND event->event_name = 'button'.
      navigation->goto_page( event->event_server_name ).
    ENDIF.
    <b><u>page1.htm</u></b>
    <%@page language="abap" otrTrim="true"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page>
        <htmlb:form>
          <htmlb:button       text          = "Page 2"
                              design        = "NEXT"
                              onClick       = "page2.htm" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b><u>page2.htm</u></b>
    <%@page language="abap" otrTrim="true"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page>
        <htmlb:form>
          <htmlb:button       text          = "Page 1"
                              design        = "PREVIOUS"
                              onClick       = "page1.htm" />
          <htmlb:button       text          = "Page 3"
                              design        = "NEXT"
                              onClick       = "page3.htm" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b><u>page3.htm</u></b>
    <%@page language="abap" otrTrim="true"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page>
        <htmlb:form>
          <htmlb:button       text          = "Page 2"
                              design        = "PREVIOUS"
                              onClick       = "page2.htm" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    I highly recommend to run this in design2003. You will love that PREVIOUS/NEXT design on the buttons. If this example is not working for you, there are a few other things to be checked. But first try this.
    ++bcm

  • EP 6.0 SP2: Update a HTMLB TableView after onClick Event

    Hello,
    i generate a TableView from a JDBC database selection.
    Outside this TableView there are 3 Buttons.
    Now the problem:
    If one of the buttons will click, the TableView has to be updated with a new database result. Have somebody an idea, how to update the TableView?
    Stephan

    Could you be more precise?
    Default behaviour/coding is that an onClick event effects a request to the server - as your component/dynpage handles this request, you should be able to present anything that you like on this occasion. Maybe you code does not react to the HTMLB event properly?
    Regards,
    Armin

  • Dynamically call htmlb button event

    Hi
    Does anybody know how to dynamically call the onClick event of an htmlb button?
    for regular html, you use <buttonID>.fireEvent("onClick")
    thanks in advance
    Anton Kruse

    Hi,
    Use both onClientClick to call the client event an use onClick to execute the server event.onClientClick is executed with first priority and then the onClink event is fired in the server.
    e.g :
    <hbj:button
              id="Send_Button"
              text="Send"
              tooltip="Sends my name"
              jsObjectNeeded="true" onClientClick="validate();"
              onClick="onSendButtonClicked"
              width="100"
              design="EMPHASIZED">
    First the validate javascript method executes then the onClick "onSendButtonClicked()" method in the controller executes.
    If helps reward with points.
    Regards
    Ritu
    Thanks

  • Event Handling for HTMLB Buttons

    Dear Pros,
    How we handle HTMLB Button Events for the following Code in the Layout section:
    I want the user to Click this button for Downloading the Internal table displayed onto an Excel file on Presentation Server.
    <htmlb:content design="classic" >
      <htmlb:page title="page1 " >
        <htmlb:form>
          <htmlb:button id = "Dwd_Excl"
             text          = "Download to Excel"
             tooltip       = "Please click for Excel Download"
             onClientClick = "EXCEL"
             design        = "small"
             width         = "200" />
          <htmlb:tableView id          = "tv1"
                       headerText      = "Sales Statement"
                       design          = "alternating"
                       headerVisible   = "true"
                       visibleRowCount = "20"
                       selectionMode   = "lineEdit"
                       table           = "<%= t_zsstable %>"
                       iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Waiting for your suggestions/replies.
    Sincere Thanks to All.
    Vivek Singh.

    Hi Craig,
    Just worked on the code sample you provided. Heres' how my code looks in OnInputProcessing segment:
          Some internal table population code here
    then the following code segment:
    file = 'C:\ZSS.XLS'.
    event = cl_htmlb_manager=>get_event_ex( request ).
    IF event IS NOT INITIAL AND event->event_id = 'Dwd_Excl'.
      results = 'Button was pushed'.
    ENDIF.
    IF results = 'Button was pushed'.
      CALL FUNCTION 'WS_EXCEL'
        EXPORTING
          filename      = file
        TABLES
          data          = t_zsstabl
        EXCEPTIONS
          unknown_error = 1
          OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDIF.
    The problem is that when I push the Download to Excel HTMLB Button, the following Error is being displayed on the page :
    500 SAP Internal Server Error
    Error message: Exception condition "NO_BATCH" raised. ( type of termination: RABAX_STATE )
    The Layout part code is :
    <htmlb:content design="classic" >
      <htmlb:page title="page1 " >
        <htmlb:form>
          <htmlb:button id            = "Dwd_Excl"
                        text          = "Download to Excel"
                        tooltip       = "Please click for Excel Download"
                        onClick       = "ExcelButton"
                        design        = "small"
                        width         = "200" />
          <htmlb:tableView id              = "tv1"
                           headerText      = "Sales Statement"
                           design          = "alternating"
                           headerVisible   = "true"
                           visibleRowCount = "20"
                           selectionMode   = "lineEdit"
                           table           = "<%= t_zsstabl %>"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    I hope you can suggest something on this.
    Waiting for your response.
    Best Regards,
    Vivek.

  • Hi, How to stop the open new view when i click button in OnClick event

    Hi,
    I have the popup window[window.showodelDialog] with one button called confirm.and table control values
    Actual requirement: when i click confirm button it saves the tablecontrol value in the internal table. it is fine.It saves.
    Currently working is : When i click the confirm button in the onClick event ,the new view is opening with empty tablecontrol popupin the new window.I don't want that one.
    my requirement is: When i click the confirm button through onclick event ,i want to close the currently showing popupwindow and it should come to main page.How to do that?
    view1.htm
    =======
       <htmlb:button id            = "sub1"
            onClick =""
            text          = "Confirm" />
    Do_handle_data
    ============
      LOOP AT lt_form_fields INTO lw_form_field WHERE name CS
                                              't_confirm' .
        CALL METHOD /ds1/cl_mdm_tablecontrol=>populate_table(
                       EXPORTING
                         im_id      = 't_confirm'
                         im_request = me->request
                       CHANGING
                       ch_table   = me->r_asset_data->t_maintain ).
        EXIT.
        ENDLOOP.
    t_maintain it stores the changed values.. It is fine..

    Hi raja,
    1.I have a main page like req_asset_create.htm. In this page one button called maintain. If i click the maintain button the popup window is opening using window.showModelDialog. 
    2. In this popup i have a Editable tableview and one button called confirm. User can edit the values. After editing he is clicking the confirm button.
    3.when he click the confirm button two things should happen a)Popup should vanish and it should go to main page ie req_asset_create.htm.The editrd values should store in to the internal table (t_maintain).it is in model class.
    What heppenings for me using this code
    =============================
    <%----
    confirm -
    --%>
        <htmlb:button id            = "con"
            onClientClick = "self.close();"
            text          = "confirm"
            onClick       = "confirm"/>
    When i click the confirm button ->popup is closing ->thats 100% fine and again one new view is coming with popupdisplay values.This should not happen.
    a)The server event is not happening.It should happen.
    b) The edited values are not stored in the internal table..
    Do_handle_data : for storing the edited tableview values
    ===========   
    confirm
      LOOP AT lt_form_fields INTO lw_form_field WHERE name CS
                                              'con' .
        CALL METHOD /ds1/cl_mdm_tablecontrol=>populate_table(
                       EXPORTING
                         im_id      = 'tv1'
                         im_request = me->request
                       CHANGING
                       ch_table   = me->r_asset_data->t_maintain ).
        EXIT.
        ENDLOOP.
    What should i do to happen for the server event to update the edited records.
    How can i achieve? ow to control the new opening view?

  • OnClick event for a button

    hi! i did up a form using the wizard and added an extra button besides the usual update,reset etc.
    i need the onClick event of the extra button to call up a pl/sql procedure, pass in a parameter and ideally open up the report/chart in a new window and without the toolbars etc.
    i tried the following:
    phang.aresulttally?qid_p='QUESTION_RESULT.MASTER_BLOCK.QID.01.value'
    where QUESTION_RESULT.MASTER_BLOCK.QID.01.value is a text box value from the form.
    It gives me some scripting error when i run the form.
    but if i use the following:
    phang.aresulttally?qid_p=2
    it works and opens in a new window?!
    pls advise.
    thx

    For the onClick javascript event of the new button, call your own javascript function as:-
    myFunc(this);return;
    Then, you need to generate this javascript function using pl/sql in the Additional pl/sql Section - ... before displaying the page or ... after displaying the page.
    The code to get the value of a field and to open a new window would look something like :-
    htp.p('
    <script>
    function myFunc(ele)
    var l_form = ele.form;
    var win;
    var val;
    var l_url = "<url>?";
    for (var i = 0; i < l_form.length ; i++){
    if (l_form.elements.name == "QUESTION_RESULT.MASTER_BLOCK.QID.01"){
    val = l_form.elements[i].value;
    l_url = l_url+val;
    win=window.open(l_url);
    </script>

  • Javascript Onclick event on INSERT button - Kind of urgent

    I PUT THE FOLLOWING CODE ON THE JAVASCRIPT EVENT "Onclick" FOR THE INSERT BUTTON.
    onClick:
    var x=window.confirm('Are you sure ?')
    if (x)
    do_event(this.form,this.name,1,'ON_CLICK','');
    else
    return false
    IF I CLICK "OK", THEN THE FORM VALIDATION FIELDS JAVASCRIPTS STARTS TO COME UP (like NULL fields, etc...) AND ALSO THE INSERT PL/SQL CODE IS STARTED.
    THEREFORE, I RECEIVED THE ERRORS FROM THE JAVASCRIPT VALIDATION FORMS BUT I ALSO RECEIVE THE ORACLE DATABASE INSERT ERROR .
    WHY IS THE PROGRAM EXECUTING THE PL/SQL INSERT EVENT HANDLER IF I HAVE PRIOR ERRORS ?
    I AM DOING SOMETHING WRONG?
    ANY HELP WILL BE MUCH APPRECIATED..
    TKS!

    Hi,
    I think that your Javascript code is calling the do-event code for the form, where all that you need to do is stop if there is a problem, as the event has already started and the form validation will run if your onclick code returns true.
    if (window.confirm("Are you sure?")) return true;
    else return false;
    Regards Michael

  • Trigger Javascript function onClick of HTMLB button

    Hello Everyone,
    Could anyone give me some sample code to trigger a Javascript function onClick of HTMLB button. Basically I have some javascript code and I want it be executed on click of a HTMLB button. I would greatly appreciate your help. Thanks.
    Regards,
    GY

    Hi,
    as Ravi wrote, you trigger javascript functions using the attribute onClientClick. You define first the javascript code in your page and then you can call the code like this:
          <htmlb:button text    = "Some text"
                        encode  = "false"
                        onClientClick = "javascript:Your.Function()" />
    check that you define the code first and then you write the code for your button; otherwise, application will not know that the JS code exists.

  • Problem with repeating htmlb:tray onExpand event

    I have an htmlb:tray in my bsp application with an onExpand event.  I want a report generated and displayed when the tray is expanded, and this works the first time that I click on the tray icon.  However, if I am still on the same page, close the tray, and then re-open it, the tray expands with empty content.  If I set breakpoints in DO_HANDLE_EVENT, DO_INIT, and DO_REQUEST, nothing is caught.  It is as if no event is raised after the first time that the tray is opened.  If I leave the page and come back, then my process is working again.
    I cannot assume that my users will only open a tray once while on a page.  Is there a trick to get the onExpand event to trigger more than once?  (I have several trays with various reports on the page, and I don't want to pre-generate all of them.)
    Janice Ishee

    Hi,
    You need to use <b>onCollapse Event</b> also. I tested. Its working fine after adding the onCollapse Here is the sample code:
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form>
          <htmlb:tray id          = "TermReq"
                      title       = "Termination request"
                      width       = "225"
                      onExpand    = "getTermReq"
                      onCollapse  = "dummy"
                      isCollapsed = "<%= query->enab_trmreq %>" >
            <htmlb:trayBody>
              <htmlb:textView text   = "Hello World!"
                              design = "EMPHASIZED" />
              <htmlb:button text    = "Press Me"
                            onClick = "myClickHandler" />
            </htmlb:trayBody>
          </htmlb:tray>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Event handling:
    EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
      WHEN 'tray'.
      WHEN 'getTermReq'.
        QUERY->ENAB_TRMREQ = ''.
      WHEN 'dummy'.
        QUERY->ENAB_TRMREQ = 'true'.
    ENDCASE.
    Hope this will solve your problem.
    Raja T
    Message was edited by:
            Raja T

  • HTMLB +  htmlb:button

    Hello Friends,
    I have a problem in using HTMLB, button in view of BSP page. Actually the problem is that I want to call the main contrller when user click on the button. But as in view there is not Event Handler, so while "onClick="event_1"/>, how I can handle this event!
    here is a bit of code segment!
    <htmlb:button  width="10" onClick="event_1"/>
    Does it work ?? like this if I call controller direct ??
    <htmlb:button  width="10" onClick="main.do"/>
    With Regards,
    Haider Syed.

    So, after making a small mistake in my last post (corrected now), I will try to bring some light into this situation:
    First, summarize all the options you have:
    Each form has a "target" (<b><form action="target_controller.do"></b>) which the browser will submit the form data to.
    Note that this is different from the actual target-attribute (<b><form target="_blank"></b>), which is used to specify the location where the server-response will be displayed - you can let it be shown in a new window here.
    Then, for form elements, you have the option to set client-side javascripts, using the <b>onClientClick</b> attribute. It's best if you just call a javascript function here, and define this function somewhere else in your code (javascript-file-include for example).
    <htmlb:button ...
       onClientClick="yourFunction();" />
    You can access your HTML elements (also form elements) using javascript, so changing the target or action parameter from within your function is possible!
    To finish this post, there is the server-side event, specified by the <b>onClick</b> attribute, which is usually checked for in DO_HANDLE_EVENT (in case of MVC) or in OnInputProcessing (for non-MVC BSP pages, like Craig mentioned). But remember, this is server-side event!
    So, with this info, you should be able to specify in more detail what you call "for each button a new event" - whether you mean server-side or client-side event ... maybe thinking about this alone will almost solve your problem.
    Regards,
    Max

  • How to supress the onClick event?

    Hi, is it possible to Supress an onClick event from an htmlb extension object?
    i want to add a confirm message in javascript.
    if the user select 'no' the form should not be sended.
    i thought about add a onClientClick handler and supress or initiiate the onClick event there.
    is this possible, or btw. is this a good solution?
    Message was edited by:
            Grafl Ronald

    Here you go..
    <%@page language="abap" %>
    <%@extension name="zhtmlb" prefix="zhtmlb" %>
    <script language="JavaScript" type="text/javascript">
    function WindowOpenPopup(buttontype) {
    if (buttontype == "A") {
    Check = confirm("Do you really want to approve the requisition items?");
    if (Check == true) {
    htmlbSL(this,2,'ButtonReject:PRApprove');
    </script>
    <zhtmlb:content design="design2003" >
      <zhtmlb:page title="Query flight data " >
        <zhtmlb:form>
          <zhtmlb:button id            = "ButtonApprove"
                        text          = "Approve"
                        design        = "Emphasized"
                        tooltip       = "Approve PReq"
                        encode        = "FALSE"
                        onClientClick = "javascript:WindowOpenPopup('A');" />
        </zhtmlb:form>
      </zhtmlb:page>
    </zhtmlb:content>
    Raja T

Maybe you are looking for

  • When opening files in photoshop I am not able to see the images. I simply see the grey background.

    Simply tring to shapen some jpeg image files. Using photoshop CC 14.2.1 on Window 7 Pro, SP1 Since install images have not opened. Are there settings that I need to check/alter?

  • Configuring SAP BI server in Lumira Preferences to support SSL

    Hello all , We are currently on SAP BI 4.1 SP 5 FP 3 and we have installed the latest version of SAP Lumira  . We have also implimented SSL for secured login to BI launch pad ,CMC -etc . Is it possible to configure the SAP BI server URL in Lumira pre

  • WEBLOGIC CRASH

    My weblogic has been consistently crashing. This is the last dump that it gives. Any clue? I went to Sun site and they've posted that if the Hotspot error happens on a third party product, contact the vendor. # HotSpot Virtual Machine Error, Internal

  • Motion path on rotated ellipse?

    Hi, I'm an experienced animator (with Flash) but relative newbie to Motion, and so finding some things very frustrating but also empowering. I've got a series of ellipses kind of like an atomic symbol which I'm trying to rotate small objects (spheres

  • Redarding receiver determination

    hi all iam ajay, here i faced a problem at xi server. even i created the receiver determination it alerts an error in receiver determination.i furnished my error below. let me know the solution <SAP:Category>XIServer</SAP:Category>   <SAP:Code area="