3 Replies Latest reply: May 20, 2010 7:47 AM by peter_raganitsch RSS

    Updating A Table With Javascript Passback

    493904
      My application concerns registration of vehicles and I have a problem.
      From the main vehicle screen, the operator clicks on an icon to choose a number plate. This icon opens a cutom popup page displaying this report.

      select REGISTRATION, 'placeholder' the_link
      FROM MER_BFG_REGISTRATION_NOS
      where ISSUED IS NULL
      and :P11_MANUFACTURED_DATE between VALID_FROM and VALID_UNTIL
      AND UPPER(REGISTRATION) LIKE '%' || UPPER(:P31_SEARCH) || '%'
      ORDER BY REGISTRATION ASC

      In the URL of my link column I have
      javascript:passBack('#REGISTRATION#');
      In my page header I have
      <script language="JavaScript">
         function passBack(passVal1)
         {
         opener.document.getElementById("P16_BFG_NO").value = passVal1;
         opener.document.getElementById("P16_BFG_NO_SHOW").value = passVal1;
         opener.document.getElementById("P16_BFG_NO").focus();
         close();
         }
      </script>
      .

      My problem is that when the user clicks on the link for a particular registration, a flag should be set against this registration, so it cannot be chosen by another user in another session.
      Once they have returned to the main page I can undo this flag, after the record has been saved and replace it with an issued_date.

      Has anybody got an ideas how to achieve this

      Gus