To check for validity......

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divyac
    New Member
    • Aug 2008
    • 40

    To check for validity......

    I posted this same question previously to generate form fields dynamically but now i have got one more doubt..pls help me..I am doing an inventory project using PHP and in Sales/Rentals page there is a text box.The customer id should be entered in that text box or entered using a barcode reader.If that customer id is valid,another text box should be generated in which the product id should be entered..If that product id is valid,other 3 text boxes should be generated dynamically in order to do transaction.It is possible for me to generate text boxes dynamically using javascript but I dont know how to check whether the customer id and product id are valid using javascript....
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    this depends on the amount if ids to check. if there are only some you can store them in the script. if you have too many you could use ajax to connect to the server and do the check there.

    regards

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by Dormilich
      this depends on the amount if ids to check. if there are only some you can store them in the script. if you have too many you could use ajax to connect to the server and do the check there.

      regards
      AJAX is the proper way of doing this. Storing them in the script (or loading them into an array when the page loads) does not take into account ids added after the page has been loaded.

      Comment

      Working...