Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Appending HTML to textarea value
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedAppending HTML to textarea value

 Post Reply Post Reply
Author
pjodoin View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote pjodoin Quote  Post ReplyReply Direct Link To This Post Topic: Appending HTML to textarea value
    Posted: 29 September 2006 at 6:18pm
Hi,
 
In the current page, there is an editable DIV area acting as a textarea for user input:
 
<div id="DocContent" contenteditable><%=strContent%></div>
 
and there is a button on this page to open up a new window for user to append some text to the DIV area. So on the new window page, I have some javascript to do the job:
 
window.opener.DocContent.innerHTML=window.opener.DocContent<%= controlName%>.innerHTML + "text to be appended";
 
Now we would like to replace the DIV area by the RTE textarea, is there any way to do the same thing and append the text to the RTE textarea value?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2006 at 2:20am
Scrap the editable DIV area, turn it into a regular textarea and then apply the RTE to it.
Back to Top
pjodoin View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote pjodoin Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2006 at 2:34pm
we have done that sucesfully, except that after we do that, we can no longer dynamically insert links into that same textarea.  SInce we must be able to insert links in that area, we were wondering if you had any ideas on how to incorporate both
Thanks
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2006 at 11:46pm
See this post might help, if not have a look through some of the others in teh forum:-

http://forums.webwiz.net/forum_posts.asp?TID=21391
Back to Top
pjodoin View Drop Down
Newbie
Newbie


Joined: 29 September 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote pjodoin Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2006 at 3:13pm
No luck. I try to put
window.opener.document.getElementById('MyRTE').contentWindow.document.body.innerHTML = window.opener.document.getElementById('MyRTE').contentWindow.document.body.innerHTML + "Text to append";
 
but it doesn't update the content in the RTE.
 
Thanks,
Paul
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2006 at 10:12am
This would need to be run after the RTE has loaded.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.