I am using prompt()for taking a reason from vendor .
var reason=prompt('Reason for deleting:','');
Then i am checking a that reason cannt exceed 256 length,if it exceed i have to give an alert message.I done the following
alert("Value Exceed 256 character...");
But i am getting a script error that "length" is nt an object ,so how to remove this script error.And also this prompt is coming at top left corner i want that in a center so how to do it please help me.