Jump to content
Sign in to follow this  
dev

window.frames["myRTF"].document.body.innerHTML

Recommended Posts

hi,I am constructing a small RTE for my forum and finally stucked in last turn. i am using iframe to do rte job done and its really working smoothly but didn't get any idea on how to retrieve the edited html values and store in database. so to do that i used an hidden input.<form name="myform<iframe name="myRTF" id="myRTF" class="EditControl" frameborder="0" onblur="UpDate()"></iframe><input type="hidden" id="readtxt" name="htmlval" /></form>the idea is to update the myform.htmlval.value with window.frames["myRTF"].document.body.innerHTML; this code work fine in IE6 and hopefully IE7 too but Opera don't support it. so i tried contentdocument.body.innerHTML too but nothing happened. this rte do not use textarea.i am not so good in java. so dear experts: is there any other way to retrieve the html values or help me to understand and solve the problem. i really din't understand why opera is not supporting window.frames["myRTF"].document.body.innerHTML?hope someone in this forum will save me :)with thanks

Share this post


Link to post
Share on other sites

Just try document.getElementById("myRTF").document.body.innerHTML instead.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...