Link to home
Create AccountLog in
Avatar of garethtnash
garethtnashFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Update TinyMce Editor within FancyBox getting data via Javascript

Hello,

I'm having a little fun, dynamically selecting data to be updated via a tinymce editor that is loaded in a fancybox...

Without tinymce the text to be updated is shown in a standard textarea within the fancybox...

I'm calling it like so --

<%
With response
.write("<a class=""inline"" href=""#editnote"" title=""Edit Document"" onclick=""document.getElementById('noteId').value = '" &(RSNotes("id"))& "';document.getElementById('note').innerHTML='" &(RSNotes("Notes"))& "'"">" & VbCrLf)
.write("Edit" & VbCrLf)
.write("</a>" & VbCrLf)
End With
%>

Open in new window


And the form loads like --

<form id="editnote" name="editnote" class="greyform" method="get" action="/partners/detail.asp">
<h1>Edit / Delete Comments </h1>
<p>Use the rich text editor below to edit this note;</p>
<textarea name="note" id="note" cols="45" rows="5"></textarea><br />
<input name="button" type="submit" class="btn btn-primary" id="button" value="Update" />
<input type="hidden" name="updatenote" id="updatenote" value="Y" />
<input type="hidden" name="noteId" id="noteId" value="" />
</form>

Open in new window


Any suggestions?

The page itself may contain lots of notes....

Thank you
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

You may need to load your tinymce from the same page as your fancybox.  Tinymce will just transform the text area to the wysiwyg.
Avatar of garethtnash

ASKER

Umm, they are both on the same page..
?
What is the issue?
None of the content loads in the rte
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Found a work around, send the data via an iframe.

thanks Padas