473,396 Members | 2,011 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,396 software developers and data experts.

Problem opening page in dynamically generated iframe


Hello, I have been having some trouble with this one, so I decided to
strip it down to its simplest form. I think I found the root of the
problem, but I don't know how to solve it.

I need a link in one iframe to open a page in a different iframe. I can
do this normally:

http://www.jonesmfgmusic.com/test/test1/

But, when the iframes are dynamically generated (created via a
javascript function), the target id does not seem to be recognized, and
the content is opened in a new window:

http://www.jonesmfgmusic.com/test/test2/

I need to get the second page working like the first one. Can anyone
tell me what I'm doing wrong?
--
Malkalypse
------------------------------------------------------------------------
Malkalypse's Profile: http://www.highdots.com/forums/member.php?userid=23
View this thread: http://www.highdots.com/forums/showthread.php?t=1519468

Jul 23 '05 #1
1 1803
Jc
Malkalypse wrote:
Hello, I have been having some trouble with this one, so I decided to
strip it down to its simplest form. I think I found the root of the
problem, but I don't know how to solve it.

I need a link in one iframe to open a page in a different iframe. I can
do this normally:

http://www.jonesmfgmusic.com/test/test1/

But, when the iframes are dynamically generated (created via a
javascript function), the target id does not seem to be recognized, and
the content is opened in a new window:

http://www.jonesmfgmusic.com/test/test2/

I need to get the second page working like the first one. Can anyone
tell me what I'm doing wrong?
--
Malkalypse
------------------------------------------------------------------------
Malkalypse's Profile: http://www.highdots.com/forums/member.php?userid=23
View this thread: http://www.highdots.com/forums/showthread.php?t=1519468


AFAIK, you're not doing anything wrong, there seems to be an issue in
IE with setting the name property on an element created using
createElement. Refer to:
http://groups.google.ca/group/comp.l...137a54913b8474

I added an alert to show document.body.innerHTML, and the name property
doesn't seem to be getting set properly. Interestingly, I did find that
the following code seems to work in IE:

var TargetFrame = document.createElement("<iframe name='Target'>");

I didn't test it, but the linked thread suggests trying innerHTML or
insertAdjacentHTML to create the iframe in IE.

Jul 23 '05 #2

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

Similar topics

1
by: Koms Bomb | last post by:
I create two iframes dynamically to get data from the server. I want to deal with the data after it's downloaded, so I set the two iframes' onload event handlers to current document(not the iframe...
8
by: Ashish | last post by:
Incase the problem got bogged down reposting... Hi Gregory, I think I didnt make myself much clear. The problem is: 1. I have one ASP.NET application (no classic asp) and it has a main page...
26
by: shlomi.schwartz | last post by:
using this example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test Page</title> </head>
18
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
3
by: jobs at webdos | last post by:
I have a bunch of html pages and a database table with links to them. I want to dynamically display those pages inside a set location on an exsisting asp.net 2.0 page when a link is selected,...
1
by: gzannd | last post by:
I have a problem with submitting a form to a PHP page through a dynamically created IFRAME in IE7. This code works fine in Firefox. However, IE7 submits an empty form--the correct PHP page is...
1
by: XP | last post by:
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...
4
by: solanki | last post by:
> Hi Folks, > > I am finding a small trouble while printing the entire contents of an > Iframe which carries an html report which is in turn generated by > jasper reports.s > > Hear is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.