That script should work fine, but since all the buttons have basically the same script, you could omit the script part of the handler, and assign them a behavior instead. This is a good example of when to use a behavior. The behavior button script would be something like this:
on mouseUp
go cd (the label of the target)
end mouseUp
Create that button, name it "goCardBehavior", hide it, and in your original handler add this line instead of the part that writes the script:
set the behavior of it to the long ID of button "goCardBehavior"
One advantage of using behaviors is that when you need to change the script later, you only have to do it in one place.