GetElementbyID Issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chico Che

    GetElementbyID Issue

    We have a third-party web application that is used for data entry, using
    the IE developer we have the ids of four textboxes that have data that we
    need to pass to a client application. Is it possible to create a button in
    ie or firefox that would get the values on the open browser window and send
    output. Anything would be greatly appreciated.
  • Doc O'Leary

    #2
    Re: GetElementbyID Issue

    In article <Xns9AC185A7582 0DChicoche@216. 196.97.131>,
    Chico Che <jsisk24@yahoo. comwrote:
    1. A user logs in to web app thru ie
    2. They do an invoice for a particular item
    3. Record the transaction and two text boxes get filled out on browser app
    >
    Is it possible to create maybe a ie toolbar button that would grab data
    from those two text boxes(id is known already from ie developer bar).
    It sounds like what you want is a bookmarklet, so it's very possible.

    --
    My personal UDP list: 127.0.0.1, 4ax.com, buzzardnews.com , googlegroups.co m,
    greatnowhere.co m, heapnode.com, individual.net, localhost, ntli.net,
    teranews.com, vif.com, x-privat.org

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: GetElementbyID Issue

      sid@sidroberts. co.uk wrote:
      On Jun 18, 8:08 pm, Chico Che <jsis...@yahoo. comwrote:
      >1. A user logs in to web app thru ie
      >2. They do an invoice for a particular item
      >3. Record the transaction and two text boxes get filled out on browser app
      >>
      >Is it possible to create maybe a ie toolbar button that would grab data
      >from those two text boxes(id is known already from ie developer bar).
      >>
      >Hopefully this explains a little better
      >
      <script type="text/javascript">
      function grabInputConten ts(id) {
      var input = document.getEle mentById(id);
      return input.value;
      }
      </script>
      >
      It's important to note the lowercase "d" in Id. getElementById returns
      the DOM object of an element using the ID specified.
      It is also important to know that document.getEle mentById() may return a
      value that is not convertible to an object reference in which case the
      `return' statement as it is will cause a runtime error.

      A possible fix:

      function grabInputConten ts(id)
      {
      var input = document.getEle mentById(id);
      return input ? input.value : "";
      }

      BTW, your indentation and quoting sucks.




      PointedEars
      --
      var bugRiddenCrashP ronePieceOfJunk = (
      navigator.userA gent.indexOf('M SIE 5') != -1
      && navigator.userA gent.indexOf('M ac') != -1
      ) // Plone, register_functi on.js:16

      Comment

      Working...