This is probably RunRev 101 stuff, but I'm having a problem getting my head around the syntax, so here goes:
I've got this code on a button:
on mouseUp
ask question "Please enter the ftp site address" with field "ftpField"
put it into field "ftpField"
end mouseUp
However, if I press 'cancel' the field is emptied, but I want it to stay as it was, i.e. no change.
How's this done?
Ask - cancel gives empty field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
I fixed it!
Code: Select all
on mouseUp
ask question "Please enter the ftp site address" with field "ftpField" titled "Enter FTP site details"
if it is empty then
exit mouseUp
else
put it into field "ftpField"
end if
end mouseUp