Thanks for the feedback.
As you say, there are many available if only I had searched. Searching via Google for 'javascript (creditcard OR "credit card") validation' returned many interesting possibilities, including:
http://www.breakingpar.com/bkp/home.nsf ... C70060A01B
That's nice concise code and pretty close to what I'm looking for, except that:
1) It needs to accomodate more cards types (starting with the Aussie "BankCard").
2) I suspect there's a bug in that it allows card#s with dashes but doesn't appear to account for these when computing the checksum.
Both of those should be fairly trivial to fix.
There's another interesting example at
http://javascript.about.com/library/scr ... cvalid.htm and no doubt many more elsewhere.
IIRC, there was some discussion here about how to create a global method which can be called as a function from various form methods. Any pointers here?
Thanks,
Neale.