Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Probably a silly question, but what's the deal with this?

  <button ...
   onclick="location.href='mailto:jashkenas@gmail.com?Subject=Code%20Read%20%5BSmall%5D'">
    Small
  </button>
Not a huge deal but I think it's good to show where a link goes on mouseover, especially a mailto: link (some mail clients take a while to start) ... it'd seem you want <a> here.


Just started with a bit of CSS that worked better for a button is all. You're right that a real link would be better. I'll change it.

The idea is to perhaps eventually sell these directly on the page, via Stripe, in a more explicit fashion. But for starters at least, I think we'll work together on setting the scope of the "read", and keep things bespoke.


Could be spam prevention?


If that were the aim, and he's content to rely on JS, why not set the href attribute at runtime?

In any case I'd think a small contact form a worthy investment, as I doubt he's charging pennies.


Maybe because of the fact that bots usually scan the href attribute, but not the onclick attribute?


I would think any self respecting bot would notice "Hey, there's a valid email address on the page source code :D".


If someone has coded up a "self respecting bot" then I think we've lost all hope against the spam harvesters (unless, of course, that bot's notion of self respect includes the recognition that spam is annoying to innocent people :)


I tried clicking and it did nothing. That's bad advertising.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: