Skip to Content

Can I trigger a javaScript on change of a htmlb:inputField?

Can I trigger a javaScript on change of an htmlb:inputField? You can do this in the dropdownListBox by using onClientSelect. I want to trigger a javaScript function when a field in an htmlb:tableView is changed.

Can anyone help?

Karen

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2004 at 11:31 AM

    Hi Karen,

    Get a look on attribute SubmitOnEnter perhaps that should solve your problem .

    Regards.

    Bertrand

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 04, 2004 at 11:20 AM

    Hi Karen,

    I came across your post now, let me know if you are still looking for an answer (hopefully you kept reading SDN) - got a way to do so.

    Regards,

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2005 at 02:15 PM

    see OnChange Event for inputField for a proper solution. there is no need for a dirty hack like proposed by some people...

    regards

    nicola

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Nicole, nice example although did you have a small typo? "JSP" did you mean JSP or BSP, if you did mean JSP which by the way your code does look like you do mean JSP then your solution isn't a BSP solution at all is it?

      As for your idea of a "proper solution" well as we all know that is a relative statement. If it works then it is proper if you have time to change your code when something comes along that works as well or better then go for it and now that is proper.

      Remember we are all here to help and not "bash" other solutions because we feel that ours is a more "proper solution" we're all here to help and we are all learning each and everyday.

  • Posted on Jan 31, 2005 at 05:24 PM

    In MS Internet Explorer you can use the "named script" like this:

    <htmlb:inputField id   = "Inp123"
                     value = "//model/edit_wa.pvo_ad_1"/>
    <script for="Inp123" event=onchange type="text/javascript">
      YourJavaScriptFunc( this );
    </script>
    

    Don't know if this works in other browsers too.

    Thilo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2005 at 10:50 AM

    Karen, use something like this:

    document.getElementById("myInputText").attachEvent("onchange", myScriptFuncion);

    Best Regards,

    Ariel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2005 at 02:15 PM

    hi all

    I just finished my second article on this subject. The first covers the issue using on JSP and EP 6.0:

    http://variant.ch/phpwiki/WikiBlog/2005-01-31

    the second article shows how to deal with the problem using BSP on SAP R/3 WAS:

    http://variant.ch/phpwiki/WikiBlog/2005-02-01

    I hope this helps anyone.

    regards

    nicola

    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.