• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

IE + Iframe popup problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,

I was stuck with this really frustrating problem for sometime. Let me
explain what I am trying to achieve: There is a form and an inner
iframe. The form's target is set to the iframe so that when the form
is submitted, the page does not get reloaded/changed ( as the iframe
would be the one getting refreshed. The Iframe is set to have 0 width
and height to make it look invisible ).

The html source ( http://www.mediafire.com/?9a0mdgjym2z ) to demonstrate this.
There are 2 form/iframe pair
a) Static form / iframe
b) Javascript generated form / iframe.
and both forms are submitted using javascript.

In firefox, both a) and b) works perfectly ( i.e there are no
popups / page reloads/ page change )
In IE, a) works fine BUT b) does not ( a popup is created when the
form is submitted )

I am failing to understand why b) is not working in IE ( i.e why
the popup is appearing ).
Could someone help me on this one ?

Thanks
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you submitting to an invisible iframe when Ajax would make all of this so much simpler?
 
Ranch Hand
Posts: 409
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I couldn't find iframe creation by javascript on the webpage that you linked.

myiframe=document.createElement('iframe');
myiframe.setAttribute( ...
...
document.body.appendChild(myiframe);

BTW: If you're just trying to get an asynchronous response to a click from a server object, I definitely agree that you should look into AJAX.
 
My cellmate was this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic