dlaw007
dlaw007

Reputation: 1

Unexpected user input onclick

I can't figure out how to fix this. It says the onclick is missing a semi-colon. I'm sure I'm missing something obvious - any ideas?

<a href="http://mywebsite.com" onclick="setTimeout(location.href='https://www.facebook.com/myprofile', 10);return true;">

Upvotes: 0

Views: 37

Answers (1)

tymeJV
tymeJV

Reputation: 104775

Your setTimeout syntax is invalid, it should be:

setTimeout(function() { location.href='https://www.facebook.com/myprofile'; }, 10);

Upvotes: 2

Related Questions