Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE requires refresh when returning to previous page to edit data

Status
Not open for further replies.

ZollerWagner

Technical User
Apr 18, 2001
23
0
0
US
I'm developing a site that has several PHP features. One of them allows a sender to mail an e-card to a friend. I do a lot of input testing to be sure the user inputs are clean and safe. At each step, I give the user the opportunity to go back and revise their inputs, or to start over.

On the first page I take their inputs, approve or edit them for security, and then send them to a preview page. Because I need to manipulate the data inputs first on the input page, I maintain state with their data by creating a session.

I haven't figured out a way to send the data by POST because I test/change it with PHP after they click on SUBMIT. Their inputs are no longer used, so simple posting doesn't seem likely.

I can get this to work, but it's not pretty.

The main issue is that if the user wants to return to the input page from the preview page, the browser (IE) sometimes tells them that they have to press "refresh" to resubmit the data get.

This may be a clue. It seems to happen only if they had to edit the data on the input page because it doesn't meet security tests. (Let me be clear. This is when they had to edit the inputs before they ever leave the input page.) The refresh message doesn't seem to show up if there was no problem on the input page. At any rate, this is really bad for usability. It makes me look like I messed up! Maybe I did. Any idea what's up? Is this normal or do I have a bug?

Thanks.
 
After a lot of misery, I've decided that the problem is with using history in the input element.

Am I correct in assuming that php isn't able to transparently add the session info to the history ref in the following?
<input type=&quot;button&quot; value=&quot;Edit&quot; onClick=&quot;history.go(-1);&quot;>


I haven't been able to get this following idea to work.
<a href=&quot;artCard5.php&quot;><input type=&quot;button&quot; value=&quot;Edit&quot;></a>
Is there a way to wrap a button with an anchor?


Or is there a better way to create an href link with an input button?


I've had success by putting this in the form:
<input type=&quot;button&quot; value=&quot;Edit&quot; onClick=&quot;redirect('artCard5.php');&quot;>

which then sends to this function:

<script type=&quot;text/javascript&quot; language=&quot;javascript&quot;>
function redirect(loca){
window.location.href=loca;
}
</script>

That seems terribly heavy-duty given the simplicity of what I'm trying to do. Any better ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top