Cancel in prompt browser Script
I have written one browser Script,in which I have to take some input from user as follows:
var input = prompt("Please provide input data")
now it is working when i give some input data and click on Ok, but it is not cancelling the operation when i click on Cancel.
By default there is some value in the input as 'Undefined' . So how the logic will work.I tried like
if (input == "True")
{ do this}
if (input == "False")
{ return(CancelOperation)}
bt it always take the value of input as "Undefined" or what i enter in the prompt box, it is not treating the value of input as "True" or "False". Can someone suggest on this.