read value from database & alert if it is available in database or not.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jsungmin
    New Member
    • Jan 2013
    • 13

    read value from database & alert if it is available in database or not.

    I want to create a javascript which check reference no from database
    eg: first user insert reference no in textbox, mouse.
    and the second user insert reference no also in textbox, mouse.
    so here I want to create an alert which display the popup to the second user that reference no "mouse" is already taken.

    really need ur help
    thanks :)
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    This is really a JavaScript question unless you have a problem with checking the reference number in the database.

    Post your code, so we can see where you might be having problems.

    Comment

    • jsungmin
      New Member
      • Jan 2013
      • 13

      #3
      This is textbox for insert reference no..
      Code:
      <form name="survey_form" method="post">
      <table>
      <tr>
        <td>Reference No. </td>
        <td><input name="ref_no" type="text" value="#ref_no#">
        </td>
      </tr>
      <tr>
      <td>
      <input type="button" name="Save" value="Save" class="cssNormal" onClick="DoSave();">
      </td>
      </tr>
      </table>
      </form>
      What i want is, when the second user insert the reference no, and the value of reference no already in database, it should display a message in bottom of textbox that insert reference no after click button save.
      so I think i need to use javascript to check value of reference no that insert by user whether the value already in database or not.

      any idea..?

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        If you're going to check the value in the database, you're going to need Coldfusion.

        You'll only need JavaScript if you want to avoid reloading/unloading the page.

        Post your Coldfusion database checking code.

        Comment

        Working...