Skip to Content
avatar image
Former Member

setDefaultButton not working

Hi

Can anybody suggest me how to set default button in jspDyn page , so that on pressing enter button it should be submitted. I have used the below code but it is not responding to the Enter key.

<hbj:button

id="Search"

text="SearchOrder"

width="150px"

tooltip="Click here to search Orders"

onClick="SearchOrder"

disabled="false"

design="STANDARD">

<%

myFormId.setDefaultButton(Search);

%>

</hbj:button>

Regards,

Joseph

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 18, 2006 at 05:35 AM

    HI,

    Try this

    <hbj:button id="Send_Button"

    text="Submit"

    tooltip="Send feedback"

    onClick="doProcess"

    width="100"

    design="EMPHASIZED">

    <% myFormId.setFocusedControl(Send_Button); %>

    </hbj:button>

    If you use more then one "EMPHASIZED" button, the last button defined becomes "EMPHASIZED".

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2006 at 03:05 PM

    hi ...

    check this link it may help you..

    how-to-make-a-submitbutton-with-htmlbbutton

    regards..

    rajesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 18, 2006 at 04:37 AM

    Hi Joseph,

    Default button concept works with EMPHASIZED design only because it represents the button in focus. So as Yoga has suggested, it will work fine with EMPHASIZED design.

    Regards,

    Harini S

    Add comment
    10|10000 characters needed characters exceeded