This is what I have so far (Not sure if it's correct):
var d = new Date();
var y = d.getFullYear();
Dropdownlist1.setItems([y, y + 1, y + 2]);
Any help would be appreciated, thanks.
Change the last line to:
this.getField("Dropdownlist1").setItems([y, y + 1, y + 2]);
Regarding the location of the code: That depends on when you want it to update the list.
Also, realize that when you run it the current value of the field is discarded, so running it each time the file is opened is probably not a good idea...
Use MouseUp instead of MouseDown. It's a more standard way of doing it.
Appreciate it thank you, I think I have to resort to one of the field events instead as you mentioned that having it on the document level will discard the field value every time the file is reopened.