HTML1506: Unexpected token in IE

category:  WordPress, Javascript, jQuery, Web development

Yesterday, I received a support task from one of my clients. It was urgent because the users could not buy the product online. The issue occurred only in the IE browser(IE11 and IE edge). I checked the error message at the console and I found “HTML1506: Unexpected token“. I saw the same error back in 2015 when I worked with another client in the USA. This error is very common in IE. The cause The sample of JS code that … Read More

How to add the links inside the select box

category:  Javascript

We all know that we can not add the links inside the <option> in the select box. Today I gonna share one simple trick with pure javascript.   Let’s say you want to add the links inside the <option> like this. <select class=”menus”> <option value=”Home”><a href=”home.php”>Home</a></option> <option value=”About”><a href=”about.php”>About</a></option> <option value=”Contact”><a href=”contact.php”>Contact</a></option> </select> Of cause, it is not working.   Here is the correct one with the javascript. <select class=”menus” onchange=”location = this.value;”> <option value=”Home.php”>Home</option> <option value=”About.php”>About</option> <option value=”Contact.php”>Contact</option> </select> … Read More