Iframe form not submittin in IE but working in Firefox

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">
<html xmlns="http://www.w3.org/1999/xhtml">
<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">
</iframe>

</body>

</html>

Answers


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.


info on this blog gives full details and code to resolve:

http://viralpatel.net/blogs/2008/12/how-to-set-third-party-cookies-with-iframe.html

How to set p3p http header in ASP.Net?

HttpContext.Current.Response.AddHeader("p3p", "CP=\""IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""")

How to set p3p http header in PHP?

header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

How to set p3p http header in JSP?

response.setHeader("P3P","CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'")

How to set p3p http header in ColdFusion?

<cfheader name="P3P" value="CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'" />

lifted from the blog post, in case it dies.


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/


Need Your Help

SSRS - Multiple Tablix Filters Based on Mutiple Parameter Values

reporting-services filter parameters

I have an SSRS Report parameter set up with 3 different values ("Paid", "Denied" and "Open"). I want to set a tablix filter up so when the user selects one of the parameters, and a condition in the...

How to show Action Keys in window application always

c# .net winforms

I have a window application that has a menu that contains some items like 'File', 'Open','Save','Close'. I have added a Action Keys to the every items in menu as given below.