473,545 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can action in an iframe change look and feel of the containing HTML?

I have a HTML file that contains an iframe. The HTML file is served
by one server. The iframe contains a link to a completely different
server. My question is, can any action in the iframe (such as a form
submit) cause the look and feel of the containing HTML to change, such
as I want some table elements in the parent (that contains the iframe)
to change or disappear.

For example, a HTML file has a table with 3 rows, the first and last
row each has an element which has text "row 1" and "row 3"
respectively. The second row contains an iframe which has a link
served by a different server. When the page load, the iframe displays
a form with one text field and one submit button. When user enters a
text string such as "jessey" in the text field and clicks the button.
The text in the first row element of the parent page changes to
"jessey" and text in the last row element of the parent page
disappears.

How should I do it if it is possible? Are there any examples that I
can start with?

Thanks a lot for help.
jessey
Jul 20 '05 #1
2 3074


google@wa wrote:
I have a HTML file that contains an iframe. The HTML file is served
by one server. The iframe contains a link to a completely different
server. My question is, can any action in the iframe (such as a form
submit) cause the look and feel of the containing HTML to change, such
as I want some table elements in the parent (that contains the iframe)
to change or disappear.

For example, a HTML file has a table with 3 rows, the first and last
row each has an element which has text "row 1" and "row 3"
respectively. The second row contains an iframe which has a link
served by a different server. When the page load, the iframe displays
a form with one text field and one submit button. When user enters a
text string such as "jessey" in the text field and clicks the button.
The text in the first row element of the parent page changes to
"jessey" and text in the last row element of the parent page
disappears.

How should I do it if it is possible? Are there any examples that I
can start with?


If the iframe contains pages from a different domain then client side
script due to the same origin policy cannot change the content of the
document in the containing window.
If the servers are different but in the same domain e.g.
host1.example.c om and host2.example.c om then you can set
document.domain = 'example.com';
in script and you should be able to script one document from the other
e.g. with
parent.document
from inside the iframe you reach the document of the containing window
or frame.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
On 13 Jan 2004 00:25:21 -0800, je*******@yahoo .com (google@wa) wrote:
I have a HTML file that contains an iframe. The HTML file is served
by one server. The iframe contains a link to a completely different
server.


This is not possible in a default security environment.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #3

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

Similar topics

3
3206
by: Dany P. Wu | last post by:
Hi everyone, I am trying to create a site with pages containing iframes. This is the first time I've used inline frames and am still struggling with the concept. This site will have 10 pages and so far I have created 20 files, each page having to use a pair of files. One file for the actual page, and one file for the content of the inline...
2
1835
by: google | last post by:
I have a HTML file that contains an iframe. The HTML file is served by one server. The iframe contains a link to a completely different server. My question is, can any action in the iframe (such as a form submit) cause the look and feel of the containing HTML to change, such as I want some table elements in the parent (that contains the...
24
5213
by: ej1002 | last post by:
Hi I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C# Web Form). Is there any other method through which I will be able to access the IFrame Source of the page I am navigating to. Also I need to click...
5
2484
by: Chris Kennedy | last post by:
I want to put an Iframe on a webform page. How do I get the Iframe's source file to change at the press of button control on a web form (containing the iframe). Preferabaly without javascript, postbacks are acceptable. Cheers.
13
4117
by: Fernando Deutsch | last post by:
I have an html page with an iframe on it. Inside the iframe there is an img element. I am looking how to reference the iframe from the img element contained on it and cannot find a way to do it. I am using FireFox 1.5.0.1 I am looking for something like myImg.container. Can someone help me ? Thanks in advance
3
1567
by: jkeel | last post by:
Here's what I'm trying to do (any opinions whether this is OK or plan stupid are appreciated): I have a parent web page that will contain a Page Title at the top and a save and probably a cancel button at the bottom. The body of this page will be an iframe that will contain an asp.net page. How can I initiate the save event in the...
10
3785
by: jon | last post by:
I'm trying to use a hidden iframe to print the contents of one div seamlessly. Currently I can create the hidden iframe, copy the contents of the div to the iframe, and print it. I even have a method that initially copies all the original page's styles onto the new iframe to maintain look and feel. So far things work, and the div (along...
3
4970
by: synergy_711 | last post by:
I feel like this should be fairly easy but I have been struggling with this for sometime. I have not been able to find someone who's had the same problem as mine yet. http://g.bach.home.insightbb.com/movies.html I have a page set up on my website to view videos from various sites by creating html pages and creating links to view them...
1
1530
by: CJ4R | last post by:
Have an issue with an iframe in FF blocking links in a z-index layer behind the layer containing the iframe. It works in IE. I can't change the layer index of the iframe because it's content needs to be on top all the time. Whenever the user mouseovers that iframe content it should expand to full size. I haven't figured out how to change the...
0
7499
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...
0
7689
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. ...
0
7943
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...
1
7456
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7786
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5359
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...
0
3490
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...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.