I am trying to get the data that sits inside <p id="wysiwygBody"></p> within an Iframe...
I have a wysiwyg editor that generates an Iframe for users to type rich content into. When I type into the wysiwyg Iframe I wish to capture what has been typed into a seperate hidden form field on the parent page onmouseover.
UPDATE: --------------------------------------------------------------------
I've added an id to the Iframe called: wysiwygFrame and also added an id to the Iframes only P element called: wysiwygBody.
I am now accessing the Iframe as suggested with id's like so:
var messageContent = window.frames['wysiwygFrame'].document.getElementById('wysiwygBody').value;
and attempting to update the value of a form field called CurrentDraftMessage like so:
document.getElementById('CurrentDraftMessage').value = messageContent;
It doesn't work at all???