Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-06-2012, 09:10 AM   PM User | #1
mrchuckles2002
New to the CF scene

 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
mrchuckles2002 is an unknown quantity at this point
Internet Explorer Posting between iframes - new window on IE

Hi,

This appears to be an age old problem. But I can't seem to find a solution to it.

I have a page with two iframes on it. They are loading as such:

Code:
<iframe id="leftIframe" src="predict_goalkeepers.php" height="900" width="300" frameBorder="0" hspace="0"></iframe>

<iframe id="rightIframe" src="predict_right.php" height="900" width="300" frameBorder="0" hspace="0"></iframe>
I then want to post something from the leftIframe to the right and refresh the leftIframe at the same time. This I have done through target frame and onclick function. On the leftIframe I have this:

Code:
<form action="predict_rightframe.php" method="post" name="form1" id="form1" target="rightIframe">

<input type="checkbox" name="goalkeepers" value="1" onclick="this.form.submit(); window.location.reload(true)">
This works fine and super duper on Chrome. But when checking on Firefox and IE, the frame is opened in a new window.

Is there anyway around this?

I believe there is a "hack" whereby you can get javascript to create the right frame, thereby making it an object. But the only advice I have found is how to create a hidden frame (see here) But I want this frame to be visible.

Any help on this issue will be extremely helpful - even if its just adapting the above link's javascript code to create a visible iframe.

Any help and I will be eternally grateful.
mrchuckles2002 is offline   Reply With Quote
Old 09-07-2012, 06:38 AM   PM User | #2
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,452
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
Code:
<iframe id="leftIframe" name="leftIframe" src="predict_goalkeepers.php" height="900" width="300" frameBorder="0" hspace="0"></iframe>

<iframe id="rightIframe" name="rightIframe" src="predict_right.php" height="900" width="300" frameBorder="0" hspace="0"></iframe>
if that doesn't fix it it's not going to be worth the effort. just post to a hidden frame and refresh the right frame with the new data...
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%
rnd me is offline   Reply With Quote
Reply

Bookmarks

Tags
forms, iframe, post, post form

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 01:38 AM.


Advertisement
Log in to turn off these ads.