473,789 Members | 2,746 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1828
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.i nnerHTML, 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.create Element("<ifram e name='Target'>" );

I didn't test it, but the linked thread suggests trying innerHTML or
insertAdjacentH TML 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
3062
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 self), the handlers' JS code is generated dynamically too. But I found only the second event is triggered and I can't get the first iframe's onload event. Why? The data in the first iframe is really arrived, but it doesn't trigger the onload...
8
3358
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 (i.e. kinda SDI main window) that contains an IFrame. 2. I load different ASPX pages (that belong to the same ASP.NET project) in
26
3256
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
3350
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 the image. The desired behavior is that when the pop-up is invoked, I want the underlying window to stay put. I don't have this problem when I run the code on my local computer but I do have it when I run the code on geocities.
3
1799
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, but I don't want to change the html pages which will contain a duplicate set of <html> tags. What's the best way to implement this? WebParts? Does anybody have any simple example?
1
10934
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 called, but no form variables are passed to the page. Here's the client-side code: //Create or reuse an IFRAME to submit data to a specified page. //commandToken: A string that tells the page what to do. //data: Data that the page will work...
1
5284
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 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 ). I have a copied the html source ( at...
4
3184
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 javascript code used to print the contents of the Iframe > > function Print(reportframe) >
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10408
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9020
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.