I am basically trying to do exactly the same, not have the user enter their credit card details on my site go to Paypal directly. I am also trying to edit the checkout button behavior and am getting the same JS error, I tried deleting cache file and restarting but still doing it. Also getting a load of problems with JS errors in other areas.
I have tried rerunning the checkout wizard and that keeps making DW quit! Getting very frustrated now!