placing controls on Iframe.

S

sandyuhd

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
 
T

Thomas 'PointedEars' Lahn

sandyuhd said:
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 <[email protected]>
* @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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top