Regarding HTMLB button

Hello SDN
I'm new to portal and facing problem with button event management .when i triggered event its giving error that eventhandler could not be found .Where should i write my event handler  in"doProcessAfterInput()" or elsewhere
waiting for help

HI,
I hope this code clears your doubt
public class HelloDyn extends PageProcessorComponent {
  public DynPage getPage(){
    return new HelloDynDynPage();
  public static class HelloDynDynPage extends JSPDynPage{
    public int state = 0;
    public void doInitialization(){
    public void doProcessAfterInput() throws PageException {
     public void confirm(Event event) {
          IPortalComponentResponse response=(IPortalComponentResponse)this.getResponse();
          IPortalComponentRequest request =(IPortalComponentRequest)this.getRequest();
          InputField inputf=(InputField)getComponentByName("name");
          String inputValue=inputf.getValueAsDataType().toString();
          response.write("Welcome" + " "+inputValue);
          IUser user1 = request.getUser();
          String usn = user1.getDisplayName();
          response.write(usn);
          state = 1;
    public void doProcessBeforeOutput() throws PageException {
         switch(state)
              case 0:
               this.setJspName("HelloJsp.jsp");
               break;
               case 1:
               this.setJspName("hiUser.jsp");
               break;

Similar Messages

  • Can I launch a new JSP on a popup window, when cliking a HTMLB button ?

    Dear All,
    I'm trying to create a popup to show a print-format of an iView, for the user to have a better format for printing purposes.
    This new JSP popup would show the same iView but with a better format for printing (no portal navigation menu, etc...)
    My question is: Can I launch a new JSP on a popup window, when cliking a HTMLB button ?
    Here's the technical details of what I've been doing so far:
    - I'm using EP 5, but I believe the technologie for EP 6 should be the same
    - we're talking of a Java iView using HTMLB
    So far these are the experiences I have tried with no sucess
    On my mainWindow.jsp I have this piece of code, but it doesn't work:
    (etc...)
    <%
    ResourceBundle res = componentRequest.getResourceBundle();
    IResource rs = componentRequest.getResource(IResource.JSP, "printFormat.jsp");
    String JSP_URL = rs.getResourceInformation().getURL(componentRequest);
    %>
    (etc...)
    <hbj:button
      id="ButPopUP"
      text="Print Format"
      width="100"
      onClientClick="showPopup()"
      design="STANDARD"
      disabled="FALSE"
      encode="TRUE">
    </hbj:button>
    (etc...)
    <script language="Javascript">
    function showPopup(){
    mywindow = window.open ("<%=JSP_URL %>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1,
    resizable=1, width=600,height=400");
    htmlbevent.cancelSubmit=true;
    </script>
    (etc...)
    Thank you very kindly for your help.

    Hi Kiran,
    sorry for the late reply.
    Thank you so much for your JAR file.
    Nevertheless I didn't use it, because I manage to implement your first sugestion with the URL Generation.
    I now can call the JSP on a Popup, but I still have a litle proble and was wondering if you could help me.
    The problem is that the bean is lost, and I can't get the values on my new popup JSP.
    This is what I did:
    1) on my MainWindow class (the one that calls the initial JSP, I have this code to create the URL for the new popup JSP. This is the code:
    IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
    IPortalUrlGenerator portalGen = null;
    ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
    if (specUrlGen instanceof IPortalUrlGenerator) {
         portalGen = (IPortalUrlGenerator) specUrlGen;
         try {
              String url = null;
              url = portalGen.generatePortalComponentUrl(request, "Forum_IS.popvalues");
              myBeanDados.setPopupURL(url);
         } catch (NullPointerException e) {
              log.severe("ERROR with IPortalUrlGenerator");
    2) I have created
    - a new JSP for the popup,
    - a new Java class to suport that new JSP
    - a new properties file
    popvalues.properties with the following code:
    ClassName=MyPop
    ServicesReference=htmlb, usermanagement, knowledgemanagement, landscape, urlgenerator
    tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
    MyPop is the new class that is associated with the new JSP popup.
    The problem now is that the bean was lost.
    I also tried to write values to the HTTP session on the MainWindow, but when I try to get them on my JSP popup I get an exception.
    How can I pass the values (or beans) to my new popup JSP ?
    Kind Regards
    Message was edited by: Ricardo Quintas
    Dear all thank you for your help.
    I have managed to solve the problem I had.
    Here's the problem + solution sumary.
    I have to remind you that we are talking of EP 5, PDK 5 (Eclipse version 2.1.0), with JAVA JDK 1.3.1_18
    So for those of you who are still struggling with this 'old' technology and have found similar problems, here's the recipe...
    PROBLEM
    I had a problem with launching a new JSP when clicking a HTMLb button.
    I wanted to create a JSP to present a 'print-format' of an iView.
    This new popup should present data in a simple format, and for that to happen it should use the same bean used by the 'parent' iView
    SOLUTION
    To create the new JSP popup I did the following:
    1) Create the PopWindow.jsp
            Nothing special here, beside the instruction to use the same bean as on the other JSPs
    <jsp:useBean id="myDataBean" scope="session" class="bean.DataBean" />
       2) Create the associated JAVA class
    MyPop.java.      This class will be used to call the PopWindow.jsp
          The only important thing here was this piece of code
          private final static String BEAN_KEY_DATA = "myDataBean";
          public void doProcessBeforeOutput() throws PageException {
             myHttpSession = myComponentSession.getHttpSession();
             myDataBean = (DataBean) myHttpSession.getAttribute(BEAN_KEY_DATA);
             myComponentSession.putValue(BEAN_KEY_DATA, myDataBean);
             this.setJspName("PopWindow.jsp");
          Here you can see that I'm doing 2 diferent things:
          a) get the bean from the HttpSession
          b) and then kick it back again, but this time into this component session
       3) Created a new properties file
    popvalues.properties.      This file contains the follwing code:
          ClassName=MyPop
          tagLib.value=/SERVICE/htmlb/taglib/htmlb.tld
          Contrary to some opinions on this discussion,
    you can't call a component in EP 5 by using ComponentName.JSPname.
    Or at least that didn't work for me.
    You nee to use an aproach like this one ComponentName.NewProperiesFileName
    4) On my main class MainClass.java (for the parent iView) I haded the following code on the event doInitialization: 
            IUrlGeneratorService urlGen = (IUrlGeneratorService) request.getService(IUrlGeneratorService.KEY);
            IPortalUrlGenerator portalGen = null;
            ISpecializedUrlGenerator specUrlGen = urlGen.getSpecializedUrlGenerator(IPortalUrlGenerator.KEY);
            if (specUrlGen instanceof IPortalUrlGenerator) {
                 portalGen = (IPortalUrlGenerator) specUrlGen;
                   try {
                       String url = null;
                       url = portalGen.generatePortalComponentUrl(request, "MyMainApplication.popvalues");
                       myDataBean.setPopupURL(url);
                       } catch (NullPointerException e) {
                          etc...
          The idea here was to build dinamicaly a URL to call the popup.
          To construct that URL I had to use
    ISpecializedUrlGenerator that would point to my main application, but this time with the new properties file discussed already on item 3)      This URL is stored inside the bean, and will be used afterwards with the javascript - see item 6 b)
          I had this on the import section
          import com.sapportals.portal.prt.service.urlgenerator.IUrlGeneratorService;
          import com.sapportals.portal.prt.service.urlgenerator.specialized.IPortalUrlGenerator;
          import com.sapportals.portal.prt.service.urlgenerator.specialized.ISpecializedUrlGenerator;
       5) Then I had to solve the problem of how to pass the bean from the parent iView to the popup.
          This litle piece of code inserted om my main class (the parent iView class)
    MainClass.java solved the problem: 
          import javax.servlet.http.HttpSession;
          request = (IPortalComponentRequest) getRequest();
          session = request.getComponentSession();
          session.putValue(BEAN_KEY_DATA, myDataBean);
          myHttpSession = session.getHttpSession();
          myHttpSession.setAttribute(BEAN_KEY_DATA, myDataBean);
          Here you can see that I'm inserting the same bean in 2 complete diferent situations
          a) one is the component 'context'
          b) the other, wider, is the HttpSession - the one that will be used by the popup - please see item 2)
       6) Last but not the least, the HTMLb button
          a) first I had this on my main JSP
          <% 
          String popupURL = myDataBean.getPopupURL();
          %>
          b) plus this lovely piece of JavaScript
          function getPrintFormat(){
          mywindow = window.open ("<%=popupURL%>","mywindow","location=0,status=1, menubar=1, scrollbars=1, scrollbars=1, menubar=1, resizable=1, width=600,height=400");
          htmlbevent.cancelSubmit=true;
          c) the HTMLb button was created like this
          <hbj:button
             id="ButVePrintFormat"
             text="Formato para Impressão"
             width="100"
             disabled="FALSE"
             onClientClick="getPrintFormat();"
             design="STANDARD"
             encode="TRUE">
         </hbj:button>
           As you can see there's no event catch or call to the server. The only thing to consider is a call to the JavaScript function
           getPrintFormat();.
           Está todo lá dentro.
           That's all there is to it.

  • 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

  • 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.

  • How to pass parameters to javascript from HTMLB Button Click

    Hi Experts,
    I am using a HTMLB Button, I need to pass parameters to JavaScript onClientClick.
    Whether we can pass parameters to javascript function from HTMLB button.
    I tried to pass parameters to javascript in onClientClick, but on load of the page it is saying that its a Syntax error.
    This is the code that i have created Script
    Note: The parameters and the Button are dynamically created. Also there are n Numbers of buttons created.
    Please help me in this regard to solve the issue. If there are any error in syntax please let me know.
    Thanks & Regards,
    Palani

    Rather than using SQL loader, you could just use similar syntax in an external table definition. It both cases, the file may need to be at the OS level.
    http://www.psoug.org/reference/externaltab.html
    If your file is stored in an Apex table's clob column, you can just loop through the individual lines (but then need to parse the lines yourself). See clob2line here http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:285215954607#388438800346703098
    Or you can dump the clob to the OS first (using utl_file or dbms_lob), and then read it back using external table, taking advantage of your control file definition. sqlloader has the disadvantage of needing user/pass usually.
    http://www.psoug.org/reference/dbms_lob.html
    http://www.psoug.org/reference/utl_file.html

  • 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.

  • Clicking a htmlb:button via Java Script

    Hi all!
    I would like to 'click' a htmlb:button via Java Script.
    Example with a html-button:
    <htmlb:button id="b1" onClientClick="javascript:document.form_id['b2'].click()" text="Call Button 2"/>
    <input id="b2" type="button" onclick="alert('2')">
    Does anybody have an idea how it works with a htmlb:button?
    Thanks!
    Stefan
    Message was edited by: Stefan Kittsteiner

    Hi Stefan,
    Use this
    <script>
    function submit()
      return htmlbSL(this,2,'b2:b2Click');
    </script>
    <htmlb:button id="b1" onClientClick="javascript:submit()" text="Call Button 2" />
    <htmlb:button id="b2" onClientClick="alert('I am clicked')" text="Button 2" />
    b2Click is server event for button 'b2'.
    You can also use <bsp:htmlbEvent> for more details see weblog  <a href="/people/brian.mckellar/blog/2004/07/18/bsp-in-depth-using-the-htmlb-event-system In-Depth: Using the HTMLB Event System</a>
    Regards,
    Narinder Hartala

  • Disabling Htmlb button

    Hi,
        I have to restrict the users from doubleclicking (Save)htmlb button more than one time in my applcation. So how can i disable the Htmlb button after first action.....?? thru javascript or in dynpage..?
    Can anyone help me out
    Regards
    Ganesan S

    Hi ganesan,
      U can have some integer set by default for the button(say i=0). on Client Click of the button, this integer can be increased and the button can be disabled in Javascript.
    Try something like this onClientClick of the button in the script,
    var funcName = htmlb_formid+"_getHtmlbElementId";
    func = window[funcName];
    var button1 = eval(func("button1"));
    if(i==0){
    i++;
    button1.setDisabled(false);
    if(i>0){
      button1.setDisabled(true);
    Don't forget to set jsObjectNeeded=true for button.
    Hope this helps.
    Regards,
    Harini S
    Reward points for helpful answers.

  • 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

  • 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

  • No property to make htmlb:button invisible or visible??

    I am working on a jspdynpage proj where I need to make htmlb:button visible/invisible at runtime.. is there any property?

    Hi Kiran,
         You can use Java Script to make this happen. To make invisble or to disable use the following
    <input style="visibility:hidden;" type="button" value="Hello world!" disabled> . You can get the attributes of the button in varible, then start modifying the attribute at run time.
    Thanks
    Sathish

  • Color of HTMLB Button

    Hello,
    i want to change the color of a disabeld HTMLB Button.
    Changing the color of a active buttton is no problem with setting the CSS in an include file:
    .urBtnSml  { color: #FFFAF0;
                    background-color: #FFFAF0;
                    border-color: #FFFAF0 #FFFAF0 #FFFAF0 #FFFAF0; }
    But using the same way for a disabled button
    .urBtnSmlDsbl { color: #FFFAF0;
         border-color: #FFFAF0 #FFFAF0 #FFFAF0 #FFFAF0;
         background-color: #FFFAF0;
    it doesn't work. What's the problem??
    Thanks a lot,
    Andi

    that means that you are changing the color of a wrong button. i did change the color for both the disabled and active buttons. may be you are changing the wrong values in that element or the eleemnt itself is not the one you are looking for.

  • Htmlb Button background

    Hi
    I am developing an Iview that shows buttons corresponding to files in a km directory.
    when button pressed it will open the file.
    the button text is as the resource name .
    I would like to change the button background .
    I would also like to change the gridLayout background color.
    Can any of u write me how do I do this.
    Thanks
    Nitsan

    Look at the below code..
          <htmlb:button id       = "b_excel"
                        text     = "<span style='background-color: #FF6600;font:normal 10pt Arial;'> Download to Excel </span>"
                        encode   = "false"
                        disabled = "false"
                        onClick  = "onInputProcessing(b_excel)" />
    Raja T

  • HtmlB button class...?

    Hi, I'm studying htmlb buttons and I'm wondering why there is a difference between:
    <b><hbj:button id="button" text="Go"/></b>
    and
    <b><input type="button" class="urBtnStd" value="Go"></b>
    I checked the source of the iView that had the htmlB button, and saw that it used the urBtnStd class, so I used it using regular html.  However, for some reason it doesn't look quite the same.  I'm curious to see if there a way to make them identical?
    Thanks so much,
    Baggett.

    Hi Ville, thanks for your response, this is the short code that I have:
    <b><%@ taglib uri="tagLib" prefix="hbj" %>          
    <hbj:content id="myContext" >
      <hbj:page title="Index Page">
         <hbj:form id="myFormId">
         <br>
         <hbj:gridLayout width="100%" cellPadding="5">
         <hbj:gridLayoutCell rowIndex="1" columnIndex="1" style="title" horizontalAlignment="LEFT">
              <hbj:button id="button" text="Go to page" onClick="Go to page"/>
         </hbj:gridLayoutCell>
         <hbj:gridLayoutCell rowIndex="5" columnIndex="2" style="" horizontalAlignment="LEFT">     
              <input type="button" class="urBtnStd" ct="Button" style="white-space:nowrap;" value="Go to page">
         </hbj:gridLayoutCell>
         </hbj:gridLayout>     
         </hbj:form>
      </hbj:page>
    </hbj:content></b>
    You could just copy and paste this code and check it out.  Basically, I looked at the source of the htmlb from my browser and tried to use it's class for my regular html button.
    Thanks so much,
    Baggett

Maybe you are looking for