more portable javascript
fixed issue with the getaddress button not being clicked prior to purchase made