473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

target dynamically made iframe.

Rik
Hi guys,

First of all: no, frames are not evil in a backend application that should
not be bookmarked or indexed, and is not reliant on browser history :-)

The question:
I made a tabbed invironment, where I can add tabs + corresponding iframes.
On a button-click in one of the iframes, a new iframe + tab are made, and
the form is posted to that frame by target. This works perfectly in Firefox
& Opera, but MSIE stubbornly opens a new window. The iframes have the right
name & id in FF & Opera, but MSIE doesn't seem the grant the option to set
this name, and thus opens a new window.

To break it down to the bare minimum:
In the page itself:

ifr = document.createElement('iframe');
ifr.name = 'test';
ifr.id = 'test';
ifr.src = './test.html';
document.getElementById('tabs').appendChild(ifr);

And in test.html:
alert(window.name);

FF & Opera alert 'test', alert from MSIE is empty. Suspecting a security
issue I checked online as well, and added that site to the trusted sites,
but still no luck... I really wnat to avoid complicated XMLHTTPRequest's
for this.

Any pointers where to look?
--
Rik Wasmus
Nov 2 '06 #1
1 1495
Rik
Well, no answer here, and unfortunately haven't found quite the answer I
was looking for.

I've got a workable solution now, as followed:
- I've chosen for a fixed number of frames (20+ tabs open is offcourse
nonsense)
- Premade all frames (hidden) static in the HTML code.
- A hidden input keeps track of all unused frames.
- When the need for a new frame is there:
- The script checks wether there is a frame available.
- If so, create the 'tab' for that frame.
- Set the frame to unavailable for further scripts.
- Set the form target to that frame
- Let it submit.
- Set the form target back to default.
- On closing a tab, hide the frame, and set it available again.

Maybe this saves someone hours and hours of cursing MSIE :-).
--
Rik Wasmus
Nov 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Federico Bari | last post by:
Hi all, does somebody know how to target the answer of a form to an iframe (in ie expecially)???? I use iframe as temporary object to redirect the content do a layer built with a <div...> tag;...
2
by: Sticky | last post by:
I really need some help - i have already pulled out 1/2 my hear and the rest is following quickly..... I am designing a page containing an iFrame, the contents of which are selected dynamically...
4
by: DaveO | last post by:
Hi all I have done lots of VB programming, but am not familiar with JavaScript. Can anyone tell me how to do this ....? I have a JS file for a menu system called menu.js It contains the...
0
by: gb | last post by:
I have ParentB.html that contains ChildB.html in an IFRAME <IFRAME NAME="textareaB" SRC="ChildB.html"></IFRAME> ChildB.html contains a bookmark <A HREF="#GoHereB"></A> Also I have ParentA.html...
3
by: Quentin | last post by:
Hey there ! I made my own WebControl, that inherits from WebControls, and i added an HtmlTable to it. I would like to include a file, dynamically, to one of its cells... I've already searched,...
5
by: Angel | last post by:
Is there a way to create an IFRAME dynamically via VB.NET. In other words creating the HTML element in the server side code? thanks in advance....
7
by: ukrbend | last post by:
I use an iframe on my home page and everything works perfectly. But now I decided to add a popups to my page. The popups come not from within the iframe but from the parent frame. Again, everything...
4
by: sunil | last post by:
How do I find the length of page in target iframe? I am looking for the code or give me idea to find the length
0
by: oopaevah | last post by:
Hi, I have a set of valid xhtml pages that a third party web site is integrating with via an <iframein his own page. This retains his own branding template in the header and footer, with the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.