Append an image in Login form

Hi,

I’m trying to add a logo in login form, and I don’t know how to append the image. I was trying to add a component, and there, at label to add html code of the image.

label: “”.

Or how can I append html in the form (like in jQuery form.append("))

Thank you

Hi
You can use form container type and place there an image like in a sinple div.
dhtmlx.com/docs/products/dht … _grid.html
In this sample grid is attached to container. You can attach your image by analogy

Thank you, Darya!

I added in form configuration:

  { type: "container", name: "logo", inputWidth: 200, inputHeight: 70 }

And then:

  var logo = loginForm.getContainer("logo");

And I added content like this:

document.getElementById(logo.id).innerHTML=’’;

But how can I do this with dhtmlx code. For example logo.attachHTML() it’s not a method. How can I found what kind of methods dhtmlx supports for an element.

How can I manipulate DOM via dhtmlx?

I.E.

formData = [ {type: "container",name: "myContent",inputWidth: 380} ]; myForm = new dhtmlXForm("parentId", formData); cont = myForm.getContainer("myContent"); cont.innerHTML = '<img src="../___img/box.jpg">';
This code will give you the next result:

>>But how can I do this with dhtmlx code. For example logo.attachHTML() it’s not a method. How can I found what kind of methods dhtmlx supports for an element.
Via getContainer() you get HTML div (container element) - that is why you can’t use dhtmlx methods for your object ‘logo’

>>How can I manipulate DOM via dhtmlx?
You can’t. You need to use DOM methods for DOM objects and DHTMLX methods for DHTML objects. You can just get DOM objects from DHTMLX like
cont = myForm.getContainer(“myContent”);

Thank you very much!

One more question, please. How can I add an image in the header of a cell or in toolbar? I want to add a logo there.

There are 3 ways:

  1. Usage as tab-icon
    tabbar.addTab(“a1”, “

    aaaaaaaaaaaaaaaaaaa
    ”, “150px”);

  2. Usage as tab-picture
    my_tab.addTab(“t3”, “”,“150px”);

  3. Usage the offset area
    tabbar.setOffset(130);

    var t = document.createElement(“DIV”);
    t.style.position = “absolute”;
    t.style.borderColor = ‘#000000’;
    t.style.height = “40px”;
    t.style.width = “150px”;
    t.style.top = “0px”;
    t.style.left = “0px”;
    t.style.zIndex = 10001;
    t.style.backgroundImage = “url(‘…/___img/logo_tabbar.gif’)”;
    t.style.backgroundRepeat = ‘no-repeat’;

         tabbar._tabAll.appendChild(t);
    


Actually all I needed is:

layout.cells(“a”).setText(’’);

I’m not sure it didn’t worked for the first time.

Thank you very much, Darya!

You are welcome!