Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Need Help: Form submit and IE Back button problem !!!
Old 10-17-2006, 05:02 AM Need Help: Form submit and IE Back button problem !!!
cuongdm's Avatar
Skilled Talker

Posts: 63
Name: Cuong Dao M.
Location: Vietnam
Trades: 0
Hi guys,

My problem is when I submit my form and use the IE Back button, I got the error message "The page can not be displayed...."
below is how I do with the form

The First:
1. Page 1: submit form, method = post, action = Page 2
2. Page 2: process the form data and redirect (header/javascript) to Page 3
3. Page 3: hit the IE Back button and get the error

The Second:
1. Page 1: submit form, method = post, action = Page 2
2. Page 2: process the form data and stay in Page 2
3a. Page 2: hit the IE Back button, working properly
---------------------
3b. Page 2: click a hyperlink to page 3
4. Page 3: hit the IE Back button and get the error

I don't know why I get this error and how to solve....
need your help!
__________________
visit my site :) [
Please login or register to view this content. Registration is FREE
]
cuongdm is offline
Reply With Quote
View Public Profile Visit cuongdm's homepage!
 
 
Register now for full access!
Old 10-17-2006, 04:25 PM Re: Need Help: Form submit and IE Back button problem !!!
Nahele's Avatar
Extreme Talker

Posts: 204
Trades: 1
I believe your issue is that when you are hitting the back button, it is taking you to page 2 which processes the data, and tries to process it a second time resulting in an error. There are a few ways to get around this problem.

1. You can put a back button on your page that is simply a hyperlink back to the first page, skipping page 2. But anyone using the browser back button will still encounter this error.

2. (unverified) I've seen posts with people having similar problems and solving them using method = get instead. This will put your values into your URL though, which may be a problem. You could always encrypt them.

3. I'm not sure if you are using any PHP, ASP, etc for processing the data on page 2, but in PHP you can use the 'HTTP_REFERER' variable to direct the page. If the value is the URL of page 1 then process normally, if from page 3 then automatically direct to page 1 without processing. This is often considered an untrusted technique, however.

Does this currently work in firefox?
__________________
The worst things in life allow us to appreciate the best things

virtual kudos (a.k.a. talkupation) always welcome where deserved.
Nahele is offline
Reply With Quote
View Public Profile
 
Old 10-17-2006, 04:57 PM Re: Need Help: Form submit and IE Back button problem !!!
cuongdm's Avatar
Skilled Talker

Posts: 63
Name: Cuong Dao M.
Location: Vietnam
Trades: 0
hi Nahele,
I solved this problem, yep... you're right about the redirect... i changed from javascript (window.location) into php header function and the site ran smoothly
thank you
__________________
visit my site :) [
Please login or register to view this content. Registration is FREE
]
cuongdm is offline
Reply With Quote
View Public Profile Visit cuongdm's homepage!
 
Old 10-17-2006, 06:54 PM Re: Need Help: Form submit and IE Back button problem !!!
Nahele's Avatar
Extreme Talker

Posts: 204
Trades: 1
Glad it worked out.
__________________
The worst things in life allow us to appreciate the best things

virtual kudos (a.k.a. talkupation) always welcome where deserved.
Nahele is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need Help: Form submit and IE Back button problem !!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13236 seconds with 12 queries