Open a URL in a new tab (and not a new window)

Nothing an author can do can choose to open in a new tab instead of a new window; it is a user preference. (Note that the default user preference in most browsers is for new tabs, so a trivial test on a browser where that preference hasn’t been changed will not demonstrate this.) CSS3 proposed target-new, but the … Read more

Compare two dates with JavaScript

The Date object will do what you want – construct one for each date, then compare them using the >, <, <= or >=. The ==, !=, ===, and !== operators require you to use date.getTime() as in to be clear just checking for equality directly with the date objects won’t work I suggest you use drop-downs or some similar constrained form of date entry rather than text boxes, … Read more

Failed to load resource: the server responded with a status of 500 (Internal Server Error) in Bind function

The 500 code would normally indicate an error on the server, not anything with your code. Some thoughts Talk to the server developer for more info. You can’t get more info directly. Verify your arguments into the call (values). Look for anything you might think could cause a problem for the server process. The process … Read more

How to play audio?

If you don’t want to mess with HTML elements: Show code snippet This uses the HTMLAudioElement interface, which plays audio the same way as the <audio> element. If you need more functionality, I used the howler.js library and found it simple and useful. Show code snippet

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)