What I am trying to do is pass the contents of a tinymce text area to a modal popup. I will be dynamically replacing the article content in the popup (via a template) with the mce content that I am passing along to the targeted page in the link.
So far I have made what I need to do work in Firefox but in IE it just goes to a blank page because of the href=javascript:void();
This is the link I am using:-
Code: Select all
<a id="fullscreenpreviewbutton" onclick="fullsizeprevlink('fullscreenpreviewbutton');" href="javascript:void();" rel="" title="Full Size Preview" class="modal-button">Full Size Preview</a>
Code: Select all
function fullsizeprevlink(id) {
adcontent = tinyMCE.activeEditor.getContent();
adcontent = php_urlencode(adcontent);//this is another function I wrote
popuphref = "index.php?option=com_resource&controller=article&article= (and so on...) &previewcontent=" + adcontent;
document.getElementById(id).href= popuphref;
xval = tinyMCE.activeEditor.dom.getStyle('adpreview', 'width');
yval = tinyMCE.activeEditor.dom.getStyle('adpreview', 'height');
popuprel = "{handler: 'iframe', size: {x: " + xval + ", y: " + yval + "}}";
document.getElementById(id).rel = popuprel;
}
Hopefully I am not barking up the wrong tree here and hopefully compared to what you have all been doing its a simple solution.
Any help most welcome though!