Thread: Html Form Variable Issues
Results 1 to 1 of 1
Variable problems in HTML / Vbscript Forum: HTML ForumReplies: 0
Front Page Form Mailer Issues.... Forum: CGI Perl ForumReplies: 2
Form with variable number of fields? Forum: CGI Perl ForumReplies: 2
08-17-2007, 08:23 PM #1
Html Form Variable Issues
First apologize if this has been answered, but I am having trouble finding results for the issue I'm having.
Here's the deal. My company wasn't supporting issues that arosed when the user pressed the back button. Alot of our web development was for the restaurants in which they ran within a custom browser that didn't even have a back button.
But now I've developed a menu'ing system for the company last year. Up till now, we were telling the users that if they wanted to return the previous page that they must click on the provided "return" link on the web page.
Well now a new company of ours is asking to be able to use the back button to return to the previous page.
This isn't the problem, we have the that part working.
We are using CGI processing....
Let's say that we have a drop-down box (list) that when the page is loaded it appears like so.
<SELECT NAME="LOCATION" onChange="document.forms.submit();"> <OPTION VALUE="C001" SELECTED>Company 001</OPTION> <OPTION VALUE="C002">Company 002</OPTION> <OPTION VALUE="C003">Company 003</OPTION> </SELECT>
If the user is to change the company and select company 002, the page is submitted back to the mainframe to process the next "web page".
The now the web page has company 002 selected and showing the information for company 002.
Now the user is wanting to be able to press the back button and return back to company 001.
Everything works fine except that the drop down box still has company 002 selected. NOTE: the information on the page belongs to company 001.
I realize that the back button will only return the history of the last state that the previous page was at before the submit action occurred. But I was wondering how others are getting around this issue. I have a couple of ideas but the seem to be sloppy.
1. Create hidden fields to save the value of the original value of the drop down box. These would be created with the CGI program. for example the user would see this in the source.
<INPUT TYPE=HIDDEN NAME="SAVCOMP" VALUE="C001"
We were thinking today how we could resolve this issue and that we couldn't have been the first company to come across this issue.
So any help would be greatly appreciated.