I am simply trying to fill a Rad Text box with server data in javascript. The data is placed inside of the textbox but it is not visible until i click on the Rad Textbox.
function pickItem(name, sku, plu, nameBox, sBox, pBox) {
sBox.value = sku;
pBox.value = plu;
nameBox.value = name;
$find('mdlPopup').hide();
}
I'm sending the parameter in code for the click of a button inside of a Gridview as follows:
button.Attributes.Add("onClick", string.Format("pickItem('{0}',{1},{2},{3},{4},{5});",
e.Row.Cells[0].Text.Trim(), e.Row.Cells[1].Text.Trim(), e.Row.Cells[2].Text.Trim(), FormViewAccident.FindControl("prodBox").ClientID,
FormViewAccident.FindControl("SBox").ClientID, FormViewAccident.FindControl("PBox").ClientID));
Again, this works except for the fact that i have to click inside of the textbox. It works perfect if i use a regular asp.net textbox which is inconsistent for this project