Forum Moderators: open

Message Too Old, No Replies

Targeting a document object inside of a DIV

         

myarro

9:25 pm on Dec 17, 2008 (gmt 0)

10+ Year Member



I have created a page using DIV blocks to display other websites. I am using a <object> element within the div to be able to change and display the other websites:

<div id="webView" name="webView">
<object id="webViewObject" name="webViewObject" type="text/html" data="http://www.w3schools.com/" width="1000" height="400"></object>
</div>

What I would like to do is target elements within the DOM of the page loaded into the weViewObject.

document.getElementById('webView')...?

for example, if the page loaded into the webView Div via the webViewObject had a form element for a user's first name, how could I target that element and place a first name value?

Is it possible?

Thanks.

swa66

10:45 pm on Dec 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome [webmasterworld.com] to WebmasterWorld!

It should not be possible as it would be a major security hole.

myarro

11:18 pm on Dec 17, 2008 (gmt 0)

10+ Year Member



I don't want to change the underlying HTML/code, only to be able to place text into existing form elements.

swa66

1:51 am on Dec 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If that other site accepts parameters for filling out its forms from GET parameters or so you could fill them out that way. But accessing it via the DOM should be off-limits (imagine somebody "framing" you bank's website this way and at the right moment some script changes details just before your "submit" is actually sent out).