|
Posted by Jonathan Strange on November 25, 2004, 4:57 pm
Please log in for more thread options
I have a website that uses Forms, and if I complete the form fields,
submit the form, realise that there was an error or omission, and then
hit the Back button, the form fields are all empty. This is extremely
frustrating.
However, what's more frustrating is that this behaviour doesn't happen
all of the time - sometimes the field contents will still be there,
and other times the fields will be empty. Also, sometimes the one form
will not retain its input whereas another form will.
Can anyone please explain what's going on? Is it an HTML issue or an
IE thing? More importantly, how do I fix it so that the form field
contents are always retained when I hit the Back button?
For background it's the same whether I use IE5 or IE6 - haven't tried
any other browsers. Also most of the forms are on basic JSPs, or JSPs
with Struts; but there doesn't seem to be any consistency in which
pages display this behaviour. Sometimes it's the simple JSPs and other
times it's the Struts ones.
Any help would be gratefully received.
|
|
Posted by Inger Helene Falch-Jacobsen on November 26, 2004, 10:10 am
Please log in for more thread options
Jonathan Strange wrote:
> I have a website that uses Forms, and if I complete the form fields,
> submit the form, realise that there was an error or omission, and then
> hit the Back button, the form fields are all empty. This is extremely
> frustrating.
> Can anyone please explain what's going on? Is it an HTML issue or an
> IE thing? More importantly, how do I fix it so that the form field
> contents are always retained when I hit the Back button?
>
> For background it's the same whether I use IE5 or IE6 - haven't tried
> any other browsers. Also most of the forms are on basic JSPs, or JSPs
> with Struts; but there doesn't seem to be any consistency in which
> pages display this behaviour. Sometimes it's the simple JSPs and other
> times it's the Struts ones.
>
> Any help would be gratefully received.
You could post a link to a page to show the
problem (help us to help you...)
Both Firefox and Opera are free to download.
Anyway, I had the same problem with my php form,
it was solved when I replaced
<?php
if (stristr($_SERVER["HTTP_ACCEPT"],
"application/xhtml+xml")) {
header("Content-type: application/xhtml+xml;
charset=iso-8859-1");
} else {
header("Content-type: text/html;
charset=iso-8859-1");
}
?>
with
<?php header("Content-Type: text/html;
charset=iso-8859-1"); ?>
And I'm curious - has JSP anything to do with
javascript? Do we need to enable javascript to use
your forms?
--
Inger Helene Falch-Jacobsen
http://home.online.no/~ingerfaj/
|
|
Posted by Jonathan Strange on November 26, 2004, 10:06 am
Please log in for more thread options > Jonathan Strange wrote:
> > I have a website that uses Forms, and if I complete the form fields,
> > submit the form, realise that there was an error or omission, and then
> > hit the Back button, the form fields are all empty. This is extremely
> > frustrating.
>
> > Can anyone please explain what's going on? Is it an HTML issue or an
> > IE thing? More importantly, how do I fix it so that the form field
> > contents are always retained when I hit the Back button?
> >
> > For background it's the same whether I use IE5 or IE6 - haven't tried
> > any other browsers. Also most of the forms are on basic JSPs, or JSPs
> > with Struts; but there doesn't seem to be any consistency in which
> > pages display this behaviour. Sometimes it's the simple JSPs and other
> > times it's the Struts ones.
> >
> > Any help would be gratefully received.
>
> You could post a link to a page to show the
> problem (help us to help you...)
> Both Firefox and Opera are free to download.
>
> Anyway, I had the same problem with my php form,
> it was solved when I replaced
> <?php
> if (stristr($_SERVER["HTTP_ACCEPT"],
> "application/xhtml+xml")) {
> header("Content-type: application/xhtml+xml;
> charset=iso-8859-1");
> } else {
> header("Content-type: text/html;
> charset=iso-8859-1");
> }
> ?>
> with
> <?php header("Content-Type: text/html;
> charset=iso-8859-1"); ?>
>
> And I'm curious - has JSP anything to do with
> javascript? Do we need to enable javascript to use
> your forms?
Unfortunately the site is behind a company firewall so you wouldn't be
able to access it anyway.
As for the solution you applied to your php form, I have absolutely no
knowledge of php and wouldn't know how to apply it to JSP.
Thanks anyway!
|
|
Posted by Harrie on November 26, 2004, 10:25 pm
Please log in for more thread options Jonathan Strange said the following on 11/26/04 18:06:
>
>>You could post a link to a page to show the
>>problem (help us to help you...)
>
> Unfortunately the site is behind a company firewall so you wouldn't be
> able to access it anyway.
You could try to make a bare bone version of that site/page and put it
up a web server which is accessible to all of us. By making a bare bone
version you might find the problem yourself.
I think Spartanicus has a page about this concept, but I can't find the
URL to it. Someone?
--
Regards
Harrie
|
|
Posted by Michael Winter on November 26, 2004, 12:58 pm
Please log in for more thread options On Fri, 26 Nov 2004 09:10:19 +0100, Inger Helene Falch-Jacobsen
[snip]
> And I'm curious - has JSP anything to do with javascript?
No. JSP - JavaServer Pages (<URL:http://java.sun.com/products/jsp/>).
Effectively, server-side programming with Java.
[snip]
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
|
| Similar Threads | Posted | | User hits back button - has to enter form values from scratch | January 31, 2008, 8:39 pm |
| algin text field and button | February 21, 2007, 12:59 pm |
| align text field and button 2 | February 21, 2007, 6:26 pm |
| Back button functionality | May 20, 2005, 7:27 am |
| Back-button problems on certain web sites | February 21, 2005, 8:32 pm |
| Deactivate the effect of back button | November 15, 2005, 8:48 am |
| Prepopulating form field | August 24, 2006, 3:32 am |
| Fixing a Table of Contents Menu, when contents Scroll | May 5, 2008, 7:40 am |
| Back button interferes with navigation - how can this be avoided? | April 9, 2005, 3:36 pm |
| Using "standard redirects" so as not to "break the back button" | August 22, 2006, 10:44 am |
|