Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2004, 04:03 AM
Authorized User
 
Join Date: Nov 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eapsokha
Default Keeping data alive

Dear all,

Suppose I am filling the information of a staff; name, addressand position. Please note that position is taken from a table in access, listing in the drop-down box (select). When I filled the name and address, I note there's no such his positionexisted in the table, so I need to add more via another page. As so, after inserting new position, then come back and need to refill the name and address.

How to keep the name and address when I come back because I don't want to refill?

Thank you.

Best regards,
Sokha
__________________
Mr. Sokha Eap
Webmaster
UNDP Cambodia
 
Old February 14th, 2004, 06:31 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

How are the name and address being filled in? Are they coming from the database as well? Or is this a form that you are entering data into, and you may encounter a case where you need to create a new position? If the browser leaves the page you will have to repopulate that field some how. You could save the values off to the session object and then use those values to prefill the entry boxes. That would be the easiest way.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 15th, 2004, 09:02 PM
Authorized User
 
Join Date: Nov 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eapsokha
Default

The name and address are not from database, but in the form. I have added a button that points to the position page for adding new. So it means that it not a submit button, so how can I receive the value of the name and address fields? (suppose the form's name is "frmUser")

Sokha

 
Old February 16th, 2004, 01:05 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Unless you submit the form where the name and address field live you can not do anything with those values on the server side.

You could create a page that allows for the addition of a new position that pops up. This way you don't loose the data the user has entered for name and address. The popup page can do what it needs to add a position. Presumably you need to save a new position to the database so that it's selectable in the future. Then you need to have that popup page tell the page with the main form about the new position that was created. With some crafty javascript you can have the "new position" page tell the other form what the new position is and the form will add the position to the position selector and pre-select it for you. All of this is done on the client side with javascript. Once it's all complete the "new position" popup automatically closes itself and the user is returned back to the original form.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 17th, 2004, 03:20 AM
Authorized User
 
Join Date: Nov 2003
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eapsokha
Default

Could you please give me the sample code?

Thanks

Sokha






Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete all sessions alive before 7am JezLisle Access VBA 2 August 6th, 2007 11:30 AM
Radiobutton click keeping session Alive zaheerabbas.sk ASP.NET 1.0 and 1.1 Basics 1 April 5th, 2007 11:36 AM
Keeping the focus on a field lguzman Access VBA 7 April 20th, 2005 10:18 AM
Online alive support mccoco Classic ASP Basics 1 September 24th, 2003 02:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.