views:

413

answers:

2

I have got a form that posts values to a page in a wizard. When i'm loading this form in a Iframe everything is working fine in Firefox, it will get me to the second step of the wizard and maintains the values i filled in. When im testing this in Internet Explorer i am not getting to the second step, instead of that it returns me to the first step of the wizard with all fields being blank. When i check this in Fiddler i see that im getting a different response when i'm posting the form in the Iframe from Firefox compared to Internet Explorer. How can i make this work for all browsers? What am I doing wrong?

This is what i get back from Fiddler:

Firefox

Post:

Ressult Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
1   302 HTTP    www.dmg.eu  /brugman/budgetplanner/aanmelden.php    0   no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    firefox:6116    

Get:

#   Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
2   200 HTTP    www.dmg.eu  /brugman/budgetplanner/ 40.677  no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    firefox:6116

Internet Explorer

Post:

Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
73  302 HTTP    www.dmg.eu  /brugman/budgetplanner/aanmelden.php    0   no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    iexplore:536    

Get:

Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
74  302 HTTP    www.dmg.eu  /brugman/budgetplanner/ 0   no-store, no-cache, must-revalidate, post-check=0, pre-check=0  Expires: Thu, 19 Nov 1981 08:52:00 GMT  text/html; charset=UTF-8    iexplore:536    

Hope someone knows what the diff is :).

EDIT: (even more info.......)

The html

<%@ CODEPAGE=65001 %>
<% Response.Charset = "utf-8" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>

<meta name="robots" content="index,follow,noodp" />

<title>Hey</title>

</head>

<body class="body">

<iframe width="800px" height="1024" src="http://www.dmg.eu/brugman/budgetplanner/aanmelden.php"&gt;
</iframe>

</body>

</html>
+1  A: 

In the first case, I believe the sequence of the requests/responses is the following, please correct me if I'm wrong.

We'll call A brugman/budgetplanner/aanmelden.php and B /brugman/budgetplanner/.

You're on some page, X and in FF you do the following:

Request: POST A 
Response: Redirect B (that's the 302)

Request: GET B
Response: Result of B

However, in IE, it seems like the following:

Request: POST A
Response: Redirect B (that's the 302)

Request: GET B
Response: Redirect Y (We see another 302)

What is happening is that something in the second case is causing B to also return a redirection header. The problem is not in the client but the server.

The additional information that everyone else is asking for:

  • What is the request/response BODY of the 4 fiddler headers you posted (Go to inspecters, Raw View on both top and bottom panes to get this). This would more clearly show the values of X and Y in my above sequences.
  • What is in the server PHP code, the problem is almost certainly at B (/brugman/budgetplanner/)

Comparing the bodies of the the second request as per IE and FF should give you an indication of how the server sees them differently (to the server, a client is just an agent that prepares a request). Based on the difference in requests, the server sends back a different response.

Peter Oehlert
The problem indeed was the budgetplanner, it redirects back to the first step in wizard if the sessions are not set. I have stared myself blind on the first part, the submitting...
Younes
A: 

The following was the problem:

I was submitting the form, checking the post and then setting a session. This session wasn't set because in IE when you want to use Session vars in an iFrame you have to set header settings.

This is the code used for doing that:

ADD IN THIS LINE IN ORDER TO SOLVE THE INTERNET EXPLORER ALWAYS GET NEW SESSION ISSUE
header('P3P: CP="CAO PSA OUR"');

This is to make sure IE allows you to use sessions.

More information on: http://www.w3.org/P3P/

Younes
Note that setting a P3P header means that you're making a legally-binding statement of how you're using the cookie you're setting it for. So, make sure that your P3P statement is correct.
EricLaw -MSFT-