logo       

Processing forms without sacrificing navigation: msg#00013

php.tcphp

Subject: Processing forms without sacrificing navigation

This is really more an HTML question than a PHP question, but -



I have a site that gathers a lot of information through multiple user
interactions. I have successfully built a 'wizard' which uses forms to
gather this data initially. Now, I want to allow the user to edit sections
of the data, while still being able to navigate freely to other areas of the
site. But, if a user clicks on a link in the main navigation for a
different page in the site, I want to harvest/process any changes in the
form PRIOR to going to the new page. Unfortunately, the form data is not
available if they click a link vs. hitting the submit button.



I do not want to throw out the site navigation when a user is updating form
data, so I'm thinking of putting a hidden input field on the form to store
'link' navigation info, and then rather than having straight navigation
anchors of the <a href="newpage.php">NewPage</a> variety, having the anchor
invoke a script, which will update the hidden field with the link info, and
then force a form submit() so that the data on the form can be processed.
Then, the php page processing the form would just pick up the link info from
the hidden field when it is done, and redirect there.



This seems hoaky, but I can't think of a better way to accomplish this. I
was hoping someone here has done something similar, and has a better idea.



Any ideas/suggestions would be appreciated.



Thanks,



Geoff Thompson

Avaion Support

support-67/lXKl+RSnQT0dZR+AlfA@xxxxxxxxxxxxxxxx
<mailto:thompsgr-67/lXKl+RSnQT0dZR+AlfA@xxxxxxxxxxxxxxxx>

http://www.avaion.com <http://www.avaion.com/>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise