|
Hi, I need help to replace the value of the textarea below with the content of the innerHTML from a div in an external html file loaded into the object tag below. I'm kinda new to javascript and have been at it for some time now, but no luck
Any ideas will be a great help. Thanks.
<html>
<head>
function getdata(data)
{
var mystr=document.getElementById("message").value;
document.getElementById("message").value=window.document.getElementById(data).innerHTML;
}
</head>
<body>
<textarea name="message" id="message"></textarea>
<div id="one">
<object id="foo" name="foo" type="text/html" data="GoodMorning.html">
</object>
</div>
</body>
</html>
..and this is the content of the external file loaded - Goodmorning.html
<div class="bg3"><strong>Good Morning</strong>3</div>
<p><a href="javascript:window.parent.getdata('gre2');" id="gre1">A smile cn opn a heart fster dan a key cn open a door..Briten d world wt ur smile.Gd Monin</a></p>
<p><a href="javascript:window.parent.getdata('gre2');" id="gre2">Plz come out!
So that sun can rise, coz its waiting 2 see ur beautiful SMILE;Gud morning!</a></p>
<p><a href="javascript:window.parent.getdata('gre3');" id="gre3">Each morning we will watch d sunrise, Whle we r wraped in each odr's arms, Gud Mornin</a></p>
</div>
|
|
|
|
|
|
|
|