Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
680
Find toolbar item in JavaScript
posted

How can I find a custom dropdown object in javascript? I have looked everywhere and am missing something very simple.

For example, in this code, I can see that I have the ID of the control but I cannot figure out how to get the actual object so I can set the text value. :

 

function WebEditor_BeforeAction(oEditor, actID, oEvent, p4, p5, p6, p7, p8, act) {      

        if (act == 'texthtml') {   
         //var btn = oEditor.Toolbar.;            
           alert("Drodpown: " +dd.Key + ", " + oEvent.Key + ", " + p4.Key + ", " + p5 + ", " + p6 + ", " + p7 + ", " + p8 + ", " + act);            
           if (edit)                
              edit._showHtml(!edit._html);
             iged_closePop();        
        } 

 

I have tried loads of dfifferent approaches and always get a null value. Let's pretend that the dropdown control is called ddMyItem as an example