Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2002
Posts: 160
Member
Member
Offline
Joined: Jun 2002
Posts: 160
I've got a form page on my site that passes the contents of the form to a handling script that checks for completion of the form and that certain required items are filled out. If they're not, it displays an error message telling them that so and so item is missing, to go back and enter that information and resubmit the form. Unfortunately, for many users, when they browse back, they'll lose all the information they've entered, which is frustrating for them. I experience this in IE, but not in Firefox, but I've had reports from Firefox users that they've had this happen as well.

What I'd like to do is to open the error message results into a new browser window, leaving the form page intact (and just display the success/confirmation message there if everything is filled out).

I tried using the target attribute in the form code, but that doesn't seem to work - it seems like the handling script is overriding that. Here's what I tried:
Code
 <form action="appscript.php" target="_blank" method="post" /> 


That doesn't work, the error results still open in the same window (why, I'm not sure).

In the app handling script, I'm using code like this with a series of IF condition checks to see if a form data entry is filled in (and if it's in the right format for a few items, like e-mail address):
Code
 if($FirstName == "") {<br /><br />$html = new html;<br />$html -> send_header($pagetitle,$Cat,0,$user);<br />		<br />echo <<<UBBTPRINT<br />$tbopen<br /><tr><br /><td class="tdheader"><br />Application Error! - Missing First Name<br /></td><br /></tr><br />$tbclose<br /><br />$tbopen<br /><tr><br /><td class="lighttable"><br />	<br />	<br /><b>You did not enter a first name. Please use your browser's back button and fill out all required fields.</b><br /><br />	<br /></td><br /></tr><br />$tbclose<br /><br />UBBTPRINT;<br />  $html -> send_footer();	<br />exit;} 


How can I get these errors to spawn in a new window, leaving the form data alone in its original window? Alternatively, is there some way I can preserve the existing form data and return what's been filled out to the user on a "return to the application to fill in missing data" link or something? If so, well, how?

Sponsored Links
Entire Thread
Subject Posted By Posted
Opening results for a form handling script into a new window ZealotOnAStick_dup1 04/16/2005 9:48 PM
Re: Opening results for a form handling script into a new window ZealotOnAStick_dup1 05/02/2005 12:28 AM
Re: Opening results for a form handling script into a new window scroungr 05/02/2005 1:25 AM
Re: Opening results for a form handling script into a new window ZealotOnAStick_dup1 05/02/2005 11:42 AM
Re: Opening results for a form handling script into a new window scroungr 05/03/2005 4:02 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)