IE8 paypal button in frame not working

Discussion in 'ASP.NET 2.0' started by bravekind, Oct 17, 2009.

  1. I have a paypal button htm page that loads within .net 2.0 master page using a frame like so:

    <iframe id="IFrame1" frameborder="0" scrolling="no" src="mdgbutton.htm" > </iframe>

    If works fine, but not in IE8.

    In IE8 there is no button shown.

    Anyone else run into this problem?
     
  2. Thanks Mark

    I do have the div tags.

    This is a compatibility issue with IE8, which does not like a form to be displayed within a form, as occurs when I imbed the button page, using the iframe, inside a master page.

    I found this code from microsoft to put in the web.config file to force compatibility with IE7 but it does not work for me, so I may not have something quite right.

    <!-- added to emulate IE7 so that the paypal button shows up in a form within a page (master page | iframe | button page)-->
    <system.webServer>
    <httpProtocol>
    <customHeaders>
    <clear />
    <add name="X-UA-Compatible" value="IE=EmulateIE7" />
    </customHeaders>
    </httpProtocol>
    </system.webServer>

    Of course, the user can manually use the tools menu to force compatibility but this is not satisfactory since most won't know to do this.
     
  3. ...Yes there are some problems with that.
    btw, I've posted that web.config resolution a few times but am using it like this now:

    <httpProtocol>
    <customHeaders>
    <clear />
    <add name="X-UA-Compatible" value="IE=EmulateIE8" />
    </customHeaders>
    </httpProtocol>
     
  4. Found solution for me -
    As you indicate, I have to forces IE8 to load my pages as IE7, but the only way it worked for me was to put the instruction in the master page header:

    IFRAME with form issue with IE8. I am using a master page and I open another form within the IFRAME. IE8 apparently does not allow two forms (master page form and Iframe form) on the same page. I solved it by putting the following in the Master Page header:
    <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ />
    This forces the page to be read as IE7 would.
     
  5. mjp

    mjp

    Thanks for posting that workaround!
     
  6. It's a paypal issue

    I tried all of these things, thinking it was an IE8 issue, but it's a paypal issue.

    All you have to do is instead of setting up your buttons like this:
    <form action="https://www.paypal.com/cgi-bin/webscr" etc.

    use this:

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr"

    paypal has a problem with frames or iframes, by adding the target reference it resolves it.
     

Share This Page