Dynamically create controls in Javascript.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under JavaScript category on | Points: 40 | Views : 181
function Confirm() 
{
var confirm_value = document.createElement("INPUT");
confirm_value.type = "hidden";
confirm_value.name = "confirm_value";

if (confirm("Do you want to save data?"))
{
confirm_value.value = "Yes";
}
else
{
confirm_value.value = "No";
}

document.forms[0].appendChild(confirm_value);
}

Comments or Responses

Login to post response