Click here to Skip to main content
14,975,411 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
am creating web application for that am using CKEDITOR.
Now when I click on the CKEDITOR Textarea I want to rise a popup window.

I tried in two ways

1.
JavaScript
<script type="text/javascript">
                                    var myEl = document.getElementById('txt_pr_desc21');
                                    myEl.addEventListener('onclick', function() {
                                    $ProductProfile.dialog('open'); 
                                    });
                                </script>


onclick is working.

2.
JavaScript
<script type="text/javascript">
                                    CKEDITOR.instances['txt_pr_desc21'].on('contentDom', function() {
                                        this.document.on('onclick', function(event) {
                                        $ProductProfile.dialog('open');
                                            alert('ok');
                                        });
                                    });
                                </script>


It is giving error
Microsoft JScript runtime error: Unable to get value of the property 'on': object is null or undefined.

please suggest me, Thanks in advance.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900