Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: pratik_1712 on February 07, 2011, 06:53:03 AM

Title: Which event to use for adding elements
Post by: pratik_1712 on February 07, 2011, 06:53:03 AM
I want to add the following code to the compose window..

I am not sure which JavaScript event to bind it to..


var row = document.createElement('tr');
td1 = document.createElement('td');
td1.innerHTML = 'Priority';
td1.setAttribute('title', 'priority');
                td1.setAttribute('class', 'title');
             
row.appendChild(td1);

td2 = document.createElement('td');
td2.setAttribute('class', 'editfield');
               
                inp = document.createElement('input');
                inp.setAttribute('type', 'text');
                inp.setAttribute('id', 'compose-priority');

                td2.appendChild(inp);

row.appendChild(td2);
document.getElementById('compose-headers').lastChild.appendChild(row);