473,397 Members | 1,949 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,397 software developers and data experts.

Controlling objects outside an IFRAME

258 100+
Hi
Does anyone know how to control objects outside an IFRAME ( in the parent window )

Here I have 2 pages

The first page : 1.php

Expand|Select|Wrap|Line Numbers
  1. <body>
  2.    <input type="text" id="mytext" />
  3.    <iframe width="200" height="200" src="2.php"></iframe>
  4. </body>
  5.  
and the second file: 2.php

Expand|Select|Wrap|Line Numbers
  1. <body>
  2.    <input type="submit" id="submit" onclick="window.getElementById('mytext').value='Dynamic text'"/>
  3. </body>
  4.  
This one doesn't work
Sep 25 '07 #1
4 2650
acoder
16,027 Expert Mod 8TB
Use 'parent' to access the parent:
Expand|Select|Wrap|Line Numbers
  1. <input type="submit" id="submit" onclick="parent.document.getElementById('mytext').value='Dynamic text'"/>
Sep 25 '07 #2
bnashenas1984
258 100+
WOOOOOOOOOOOOOOOOOOOOOW
Thank you

How many of my questions have you answered?
You don't give up do you?

Thanks again
Sep 25 '07 #3
acoder
16,027 Expert Mod 8TB
You're welcome.

I can't let it stay unanswered now, can I?
Sep 26 '07 #4
Acoder,

Thanks for the help man !!!
Oct 6 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Bill Zack | last post by:
I have an interesting little ASP.NET problem. I have to position and show multiple "frames" in an IE6 browser at run time in a singe ASP.NET page. Each "frame" will contain a couple of...
1
by: John | last post by:
Hi all, I have a page which contains a few usercontrols inserted into placeholders on one main page. Inside one of these usercontrols is an iFrame tag which loads a page. If a user clicks on...
4
by: Nad | last post by:
Hello, When I click on a linkbutton of a datagrid on a web form I open another web form on the same page within an iframe. The page within the iframe has a datagrid also and when I click on a...
3
by: fkater | last post by:
Hi, inside an iframe (!) I've got links with "onmouseover=" calling javascript functions. In these functions, how do I access elements from the main window? Something like ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...
0
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...

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.