Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Auto Populating Fields In A Form

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-09-04, 11:20
cusoxty cusoxty is offline
Registered User
 
Join Date: Jun 2004
Posts: 25
Auto Populating Fields In A Form

Hello.. I am creating a form where account numbers are located in a drop down list, and there are associated text boxes to follow with the account name, region, etc.. What I want to happen is this... Once an account number is selected from the DDL, I want the other fields to "auto-populate" with the associated information from the table without clicking any button. I have been told javascipt and reposting the page are two options. However, with so much data (AROUND 16000 RECORDS), it has been suggested that I repost the page. What do you recommend? And how should i go about doing this? I would greatly appreciate any help!!
Reply With Quote
  #2 (permalink)  
Old 06-09-04, 11:59
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
You can not use the JavaScript to populate data from the table of the database since JavaScript can not work on the server side. In this case, you only can use repost the form.
Reply With Quote
  #3 (permalink)  
Old 06-09-04, 12:06
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Yup.. JavaScript.. you'll need an "onClick" event on the first DDL and subsequent DDLs except the last one. Each "onClick" event will repost the page with the values selected from the DDL.

I've had a case where I couldn't refresh the entire page, so each DDL was in an IFRAME, and the onClick event posted to the frame of the next DDL, populating it's values, and so on and so forth.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #4 (permalink)  
Old 06-09-04, 12:18
cusoxty cusoxty is offline
Registered User
 
Join Date: Jun 2004
Posts: 25
So are you suggesting i use JavaScipt or not? I am confused as to how i would go about this? any links or sample codes you can show me? I appreciate your help!
Reply With Quote
  #5 (permalink)  
Old 06-09-04, 12:23
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Quote:
Originally Posted by gyuan
You can not use the JavaScript to populate data from the table of the database since JavaScript can not work on the server side. In this case, you only can use repost the form.

Right... you can use JavaScript to submit a form which refreshes the page and your ASP in the background can populate the DDLs based upon the values that were submit.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #6 (permalink)  
Old 06-09-04, 12:25
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Use JS in on the front end to submit the form to refresh your page, and use ASP in the back end to build the DDLs based upon the values previously selected and submit.
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On