Skip to Content
author's profile photo Former Member
Former Member

Combination of onclick and on client click event of push button

Hi,

i have 6 input fields in the first page of bsp,in that iam having a particular field namely customer number.

and it contains search help.

my reqiurement is that the user can enter any of the other five fields and if he presses the help value for customer it should get the help values respect to the given value of those fields.

so what i did was i have created a pushbotton and uploaded the values using cookies of first five fields which user inputs to the customer search screen and retrived with respect to that.

but now the issue was the user needs to click on the pushbotton as well as the search help button on customer number.

so inorder to overcome this i have called the script code of search help customer number in the same push button.ie the onclick event of that pushbutton will trigger on input event and on client click will trigger the script code and now iam getting the search help of customer with respect to the inputed value

the only issue is the user need to click the pushbutton twice .

Can anybody suggest me how to trigger the both events simultaneously inorder to the avoid the user action twice?

Thanks

Nehru.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 18, 2009 at 08:21 PM

    Hi all,

    Thanks for all your useful answers,

    Now i able to populate the value on search help screen for customer based upon the company code input but one issue iam facing still now was,i couldn't able to frame the syntax for other five fields in a similar way

    kindly see the code below.

    function getkunnr()

    {

    var url = 'Cust omer.htm?p_bukrs=' + docume nt.getElem entById("p_bukrs").value

    docu ment.open( url, 'custlist', "height=500 width=400 left=420 top=150 stsus=no")

    }

    similar to company code i need to pass other 3 fields such as

    name(p_name),city(p_cty),country(p_cnty).

    example : 'Cust omer.htm?p_na me=' + document.getElementById("p_name").value

    Can anyone help me out on this issue.

    Thanks ,

    Nehru

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Nehru,

      To pass URL parameters in JS see the below code:

      var name=document.getE lemen tById('p_name') .value
      var city=document.getE lemen tById('p_city') .value
      var countyr=document.getE lemen tById('p_ciuntry') .value
      
      
      window. o pen('preview.htm?name='+name+'&city='+city+'&country='+country+'&end' , 'custlist' ,  "height=500 width=400 left=420 top=150 stsus=no")

      Regards,

      Anubhav

  • Posted on Jan 23, 2009 at 04:11 AM

    Hi Nehru,

    I dont think both events can be trigered simultaneously but you can triger both events using a single click only .

    in the OnInpurprocessing event handler,when your first button is clicked

    onclick of first button

    flag = 'X' .

    in layout..

    <%
    IF flag = 'X' .
    %>
    <s cript>
    document.getElement By Id('id of second pushbutton').cli c k() ;
    </s cript>
    <%
    CLEAR flag .
    ENDIF.%>

    Regards,

    Anubhav

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2009 at 03:30 PM

    Hi Anubhav,

    Thanks for ur response.

    But i couln't able to resolve that issue and even now it works on a double click.

    Regards,

    Mathan.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 12:17 AM

    Hi all,

    Thanks for all ur useful answers , i got the solution and provided points.

    Thanks Anubhav.

    Regrads,

    Nehru

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.