3 Replies Latest reply: Jan 10, 2013 3:17 AM by Jiri N. RSS

    jQuery - how to get tabular form element id

    Jiri N.
      Hi all,

      I have a following problem:

      I have LOV in my tabular form. I created a dynamic action when the "arrow link button" of LOV is clicked.

      jQuery selector:
      td[headers='PLANTCODE'] a
      Now I would like to get an id of LOV element e.g f09_0001. But because of lack of jQuery knowledge I do not know how to do it. Code below does not work :/.
      alert(jQuery(this.triggeringElement).attr('id'));
      Could anyone helps me?

      Thanks in advance!

      Jiri
        • 1. Re: jQuery - how to get tabular form element id
          jariola
          Jiri N. wrote:
          Hi all,

          I have a following problem:

          I have LOV in my tabular form. I created a dynamic action when the "arrow link button" of LOV is clicked.

          jQuery selector:
          td[headers='PLANTCODE'] a
          Now I would like to get an id of LOV element e.g f09_0001. But because of lack of jQuery knowledge I do not know how to do it. Code below does not work :/.
          alert(jQuery(this.triggeringElement).attr('id'));
          Could anyone helps me?

          Thanks in advance!

          Jiri
          Hi,

          How your code does not work?
          Any error messages?
          What is your APEX version?

          Your code try alert anchor tag ID what you have use as jQuery selector.
          Try
          alert( $(this.triggeringElement).prev("input").attr('id') );
          Regards,
          Jari
          -----
          My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
          Twitter: http://www.twitter.com/jariolai
          • 2. Re: jQuery - how to get tabular form element id
            Jiri N.
            Hi Jari,

            thank you for a quick reply. Your solution works, as all your solutions :).

            Thank you very much.

            One off topic question. Could you recommend me some jQuery info source (books are preferred).

            Jiri
            • 3. Re: jQuery - how to get tabular form element id
              jariola
              Hi,

              You're welcome.
              Jiri N. wrote:
              One off topic question. Could you recommend me some jQuery info source (books are preferred).
              jQuery have good documentation with examples.
              http://api.jquery.com/

              Also internet is full of blog posts and articles about jQuery
              Use Google =)

              I have not read any book about jQuery

              Regards,
              Jari
              -----
              My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
              Twitter: http://www.twitter.com/jariolai