Hello everyone, I wanted to know how JavaScript can be use to affect a webpage that displayed within another webpage.
For example assuming that the code below is objectdata.com how would I put the "theDiv.innerHTML = theText;" into the above code to access the bottom one.
Code:
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title></title>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
</head>
<body>
<object data=[URL unfurl="true"]http://www.ObjectData.com[/URL] width="1000" height="400"> <embed src=[URL unfurl="true"]http://www.ObjectData.com[/URL] width="1000" height="400"> </embed> Error: Embedded data could not be displayed. </object>
</body>
</html>
For example assuming that the code below is objectdata.com how would I put the "theDiv.innerHTML = theText;" into the above code to access the bottom one.
Code:
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<script type="text/javascript">
document.onkeyup = function( evt )
{
if( ( window.event || evt ).keyCode == 13 )
DisplayText();
}
function DisplayText() {
var theText = document.getElementById('textbox').value;
var theDiv = document.getElementById('targetDiv');
theDiv.innerHTML = theText;
}
</script>
</head>
<body>
<div><p id="targetDiv" ></p></div>
<form action="" onsubmit = 'return false'>
<p><input id="textbox" maxLength=6 size=6 name=textbox ></p>
<p><input value= "Display" onclick="DisplayText();" type="button"></p></form>
</body></html>