|
Subject:
|
Form Refill
|
|
Posted By:
|
pkgal79
|
Post Date:
|
11/18/2003 1:27:12 AM
|
i have ASP page with 3 text fields: customer no, customer name and customer phone. whenever user enters customer no., page reloads, take out customer name and customer address corresponding to the customer no entered from database table and fill the form fields of customer name and address with these values. how to prevent the page reload and perform this autofill at client side. please note that table contains more than 4000 rows.
Also, is this possible to create fields auto refill as we have in windows. I mean if my name is "sarah", the text field gets polulated by the value at once if just enter "s"
|
|
Reply By:
|
owain
|
Reply Date:
|
11/18/2003 9:01:52 AM
|
You will need to write your own Java Applet or AxtiveX Component to achieve this (although I think it is possible with ASP.NET). Your only other option is to write all 4000+ rows to JavaScript variables and then handle it in the client. This will mean that the page will take a lot longer to download though, and there are security implications, because anyone viewing the page will be able to view the source and see all of the 4000+ customers you have.
Regards Owain Williams
|
|
Reply By:
|
planoie
|
Reply Date:
|
11/18/2003 11:20:23 AM
|
ASP.Net is no more capable than ASP,PHP,perl, etc etc when it comes down to doing this on the client said. Owain's suggestion is about the only option.
You could do it slighly different by means of some hidden frames. If you created the page in question in a frameset that included a frame that was hidden (setting the size of it to 0) then you could write some clever javascript and server-side code to do lookup calls to the server as you typed in the textbox. This wouldn't be terribly fast but would greatly increase the load time of the main form.
Peter ------------------------------------------------------ Work smarter, not harder.
|