Convert TextBox field to Button with javascript

Hi, we can add a button to a solution crm with The Ribbon Workbench ribbonworkbench , Or we can convert a textBox Filed to button ,
So I create a filed type text and i added a code with javascript to change this field to button.
txtbox convert to button Dynamics crm 2013
this is the code of the custum button :

function ajoutButton(new_convertir) {
if (document.getElementById(new_convertir) != null) {
var sFieldID = "field" + new_convertir;
var elementID = document.getElementById(new_convertir + "_d");
var div = document.createElement("div"); = "50%"; = "right"; = "inline";
elementID.appendChild(div, elementID);
div.innerHTML = ' Convertir';

documew_cnt.getElementById(neonvertir).style.width = "0%";
document.getElementById(sFieldID).ondblclick = function () { DateDifference(); };

I get this result :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s