Two elements within Popup

Hello everyone,

i’ve got a little question:
Is it possible (because i can’t get it working), to attach TWO elements to a popup at the same time?

In my case, i want an editor to be in the popup (works great), but i need a headline above the editor, like saying what this editor is used for :slight_smile: So i tried adding it via attachHTML, but it get’s overwritten by the editor…

Anyone an idea or hint for me to bring a text above the editor element?

Greeting from .de,
Ben

Hi
You can create a div to place there your toolbars and then use method attachObject to attach this div to the popup

Thanks for your quick reply.

myPopup = new dhtmlXPopup(); myPopup.attachHTML("<h2 style='display: block; margin-bottom: 300px;'>NOTE EDITOR</h2>"); myEditor = myPopup.attachEditor(400, 200);

This is what i am trying to do. I add the Popup to an object (with myPopup.show(x,y,w,h)) so i don’t understand where to put the Div?!

To make it clear: I don’t need to attach the html-element above the editor this way, i would appreciate ANY way i could write text above the attached editor within the popup :slight_smile:

Here is a code sample of popup on toolbar (you can use popup on any other object)

myToolbar = new dhtmlXToolbarObject("myToolbar"); myToolbar.setIconsPath("../dhtmlxSuite_v403_pro/imgs/dhxeditor_dhx_terrace/"); myToolbar.addButton("workbut", 0, "Form in popup"); myPop = new dhtmlXPopup({ toolbar: myToolbar, id: "workbut" }); myPop.attachEvent("onShow",function(){ if(!popupForm){ popupForm = myPop.attachForm([ {type: 'label', label: "Editor is below" }, {type: 'editor', name: 'ed', id:'Description', label:'', inputWidth: 300, inputHeight: 200, value:"123123132" } ]); myPop.attachEvent("onContentClick",function(){ myPop.show() }) } });
Result: