Hi this is my first post
I'm writing a custom plugin for ckfinder using the context file menu and a dialog popup
In the "onOk" handler of CKFINDER.dialog.add() - definition
I'm trying to make the "Ok" button submit a form in the plugin, but the form is inside an iframe, and looking at the source through firebug, I see there is already an iframe (with no id) as part of the normal CKFinder implemetation. So long story short..
<iframe>
<iframe id="mycustomiframe">
<form id="mycustomform">
</form>
</iframe>
<iframe>
how do i submit the form using either jquery, "ckfinder script" or basic javascript please? I've tried using the .contents().find() jquery methods, no luck.
Thanks in advance
Here is an example of trying to get it to work using jquery, in this instance i'm just alerting the "id" of the form to see if it's found it correctly, but it alerts "undefined"
I'm writing a custom plugin for ckfinder using the context file menu and a dialog popup
In the "onOk" handler of CKFINDER.dialog.add() - definition
I'm trying to make the "Ok" button submit a form in the plugin, but the form is inside an iframe, and looking at the source through firebug, I see there is already an iframe (with no id) as part of the normal CKFinder implemetation. So long story short..
<iframe>
<iframe id="mycustomiframe">
<form id="mycustomform">
</form>
</iframe>
<iframe>
how do i submit the form using either jquery, "ckfinder script" or basic javascript please? I've tried using the .contents().find() jquery methods, no luck.
Thanks in advance
Here is an example of trying to get it to work using jquery, in this instance i'm just alerting the "id" of the form to see if it's found it correctly, but it alerts "undefined"
var dialogDefinition = { title : 'Crop Image ' + api.getSelectedFile().name, minWidth : 800, minHeight : 900, onShow : function() { // some code here }, onOk : function() { jQuery(document).ready(function(){ var myid = $('iframe').contents().find('iframe').contents().find('form').attr('id'); alert(myid); }); api.refreshOpenedFolder(); }, // more code here etc etc