Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
113
rated 0 times [  116] [ 3]  / answers: 1 / hits: 25609  / 10 Years ago, mon, june 9, 2014, 12:00:00

Please I really need your help had been trying to work this for days.




  • I'm using JQuery jQuery-ui-1.10.4.

  • I use IE 10 in my development in my localhost.

  • On my localhost it works in the IE, Chrome and Firefox.



But when I deploy it in the server IIS and access the page it have an error:




Object doesn't support property or method 'addEventListener'




But when I use Chrome and Firefox to access my page in the server, there is no error.



So I'm confused how to deal with this.



Please kindly help me.



The code is below. 'email_button' is the name of my button that when clicked should open a popup div dialog.



//get a reference to the element
var myBtn = document.getElementById('email_button');
//add event listener
myBtn.addEventListener('click', function(event) {
$( #dialog-form ).addClass(visible);
$( #dialog-form ).dialog( open );
});


Thank you in advance.


More From » php

 Answers
161
$('#email_button').on('click', function (event) {
$( #dialog-form ).addClass(visible);
$( #dialog-form ).dialog(open);
});

[#70655] Friday, June 6, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jailynbethanies

Total Points: 686
Total Questions: 119
Total Answers: 99

Location: Cook Islands
Member since Thu, May 21, 2020
4 Years ago
;