I have some code:
if(Action==8) {
txt=prompt("Enter List Values (1 = numbered list, 2 = bullet list)","");
if(txt==1){
txt = new Array();
x=1;do{
txt[x]=prompt("Enter list values (cancel to end list)","");
AddTxt+=""+txt[x]+""
if(txt[x]==null)
{x=0;}
} while(x==1);
}}
however when I click cancel on the second type of the prompt it writes NULL into the textfield. How can I stop it from doing that?
Thanks
if(Action==8) {
txt=prompt("Enter List Values (1 = numbered list, 2 = bullet list)","");
if(txt==1){
txt = new Array();
x=1;do{
txt[x]=prompt("Enter list values (cancel to end list)","");
AddTxt+=""+txt[x]+""
if(txt[x]==null)
{x=0;}
} while(x==1);
}}
however when I click cancel on the second type of the prompt it writes NULL into the textfield. How can I stop it from doing that?
Thanks