473,396 Members | 1,923 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.

placing controls on Iframe.


HI,
i'm creating acomposite web control.
for this i'm using iframe as dropdown.
Through javascript i'm creating iframe onthe page.
and ihave to display labels and textboxesin the iframe which will have
the data .
my question is how to create labels and textboxes on an iframe.
can somebody help me out

thanx
sandyuhd

Jul 23 '05 #1
1 1399
sandyuhd wrote:
i'm creating acomposite web control.
for this i'm using iframe as dropdown.
Of all the block elements that could be (ab)used for a dropdown control
(without Clean Degradation, though), the `iframe' element appears to me
the least suited. Use a `div' element if you have to, use a `select'
element for Clean Degradation.
Through javascript i'm creating iframe onthe page.
Which does not mean that you have to use it for the dropdown control.
and ihave to display labels and textboxesin the iframe which will have
the data .
my question is how to create labels and textboxes on an iframe.
Provided that the target iframe document is located on the same
second-level domain than the source document:

/**
* @author
* (C) 2003, 2004 Thomas Lahn <ty******@PointedEars.de>
* @optional Object o
* Object to be determined an method, i.e. a
* <code>Function</code> object assigned as property of
* another object. May also be a string to be evaluated
* and so is applicable to unknown properties.
* @return type boolean
* <code>true</code> if <code>o</code> is a method,
* <code>false</code> otherwise.
* @see #isMethodType()
*/
function isMethod(m)
{
var t;
(m = eval(m)) && (t = typeof m);
return (t == "function" || t == "object");
}

// Only if sub-level domains differ, see Same Origin Policy
document.domain = "my-second-level-do.main";

var
f,
d = (f = frames['myIFrame']) && f.document,
b,
textbox;

if (d
&& (b = d.body)
&& isMethodType("b.appendChild")
&& isMethodType("d.createElement")
&& ((textbox = d.createElement('input')))
{
d.body.appendChild(textbox);
}
can somebody help me out


Yes.
PointedEars
Jul 23 '05 #2

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

Similar topics

5
by: Ben | last post by:
Hi, I'm having trouble with the CSS apparently not working fully on the form input fields when inside an iFRAME. The problem is that if I resize the text size on the test.html page(see below)...
2
by: aspquest | last post by:
Hi All I have a web form page (page1.aspx) which has an iframe, and the src of the iframe is set to another web form page (page2.aspx). I would like to access the values of the server controls...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
1
by: Christian Nunciato | last post by:
Hi there: I've checked the forums, but haven't found a situation addressing my specific problem. Here's the deal: I've got a Web Form containing two Panel controls. One displays search...
2
by: BillGatesFan | last post by:
I have asp.net validator controls on a page in an IFRAME. How can I keep the page from submitting if the page in the iframe has validation errors. I can call a function in the child page from the...
0
by: DBxGlock | last post by:
Howdy folks, I have an asp.net webpage that has a table with 2 columns. In the left column is an IFrame. In the right column is a bunch of user controls including a textbox, some buttons, a...
4
by: ~john | last post by:
If I have a label on the Master Page that I would like to change its text with a button on one of the content pages, Default.aspx... It's giving me an error saying "Label1" is not found. Can you...
2
by: jabili | last post by:
I have an xml file using which the controls should be created through XSL. I have a problem with placing the controls in a table depending on the NOOFCOLS attribute. XML: ------ <FORMS_METADATA>...
2
by: DaveL | last post by:
Hello, I have a Custome Control which contains TextBox Button DataGridView design is Textbox , button When a user clicks the button i resize the custom control canvasarea to expose the...
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
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
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
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
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
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.