Print Page | Close Window

keep <Select> values when page refreshes

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=11957
Printed Date: 28 March 2026 at 7:54am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: keep <Select> values when page refreshes
Posted By: RCorr
Subject: keep <Select> values when page refreshes
Date Posted: 26 September 2004 at 12:41pm

I am currently building a form and one field requires grabbing values from a database to show the result.  Thus I need to refresh the page passing the values that have are ready been entered in the address bar.  For example: webpagename.php?fname=Joe.  Therefore when the page refreshes, the name Joe will remain in the first name text box.

I would like to the same with values in a combo box (<Select><option></option></Select>) .  The combo box gets dynamically generate when the user adds an item.  What is the best way to retain the added values when the page refreshes.




Replies:
Posted By: dpyers
Date Posted: 26 September 2004 at 1:31pm
Just pass the values from the first page to the form handler using get/post as you normally would. When the formhandler rewrites the page/another page, habe it write value="x", or "select" options for then new form elements - depending upon the requirements fof the partivular form element.

-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net