jquery

Why wont IE fire on paste event?

拜拜、爱过 提交于 2021-02-07 17:13:31
问题 I need help figuring out why Internet Explorer won't fire my 'paste' event. I'm using IE 11. Here is my code: $(document).on('paste', '.pasteTarget', handlePaste); When trying this in IE, the function never gets called. It works in chrome. 回答1: Different browsers treat onpaste differently, or not at all. For IE 11, the latter seems to be the case. From MDN: Non-Standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not

Non blocking alert for a chrome extension popup window

℡╲_俬逩灬. 提交于 2021-02-07 17:12:48
问题 I'm making a chrome extension and for it I need to add in some non blocking alerts to the pop up window. Regular alerts pause the javascript code execution and the client does not want that. I tried using jQuery's UI Dialog box but when I click the "OK" button to close it, the popup window loses focus and closes as well. Any advice on how to either add persistence to the popup window or on how to create a non blocking alert from the popup? UPDATE: The problem is that content.js is the one

Non blocking alert for a chrome extension popup window

家住魔仙堡 提交于 2021-02-07 17:11:04
问题 I'm making a chrome extension and for it I need to add in some non blocking alerts to the pop up window. Regular alerts pause the javascript code execution and the client does not want that. I tried using jQuery's UI Dialog box but when I click the "OK" button to close it, the popup window loses focus and closes as well. Any advice on how to either add persistence to the popup window or on how to create a non blocking alert from the popup? UPDATE: The problem is that content.js is the one

Add event to calender from within a browser on mobile platforms

夙愿已清 提交于 2021-02-07 14:48:59
问题 i'm working on a mobile site that lists events. I thought that putting together an ICS file, which contains all the information for a specific event, and linking to that file would be enough to have the OS handle the ICS file and add that information to the calendar. This works on Desktop Computers where the Browser asks if i would like to open the ICS file with a calendar application currently installed. On android and iOs this does not work at all. This is what i get on android:

Add event to calender from within a browser on mobile platforms

时光毁灭记忆、已成空白 提交于 2021-02-07 14:48:53
问题 i'm working on a mobile site that lists events. I thought that putting together an ICS file, which contains all the information for a specific event, and linking to that file would be enough to have the OS handle the ICS file and add that information to the calendar. This works on Desktop Computers where the Browser asks if i would like to open the ICS file with a calendar application currently installed. On android and iOs this does not work at all. This is what i get on android:

Add event to calender from within a browser on mobile platforms

不问归期 提交于 2021-02-07 14:46:39
问题 i'm working on a mobile site that lists events. I thought that putting together an ICS file, which contains all the information for a specific event, and linking to that file would be enough to have the OS handle the ICS file and add that information to the calendar. This works on Desktop Computers where the Browser asks if i would like to open the ICS file with a calendar application currently installed. On android and iOs this does not work at all. This is what i get on android:

How can I unit test an event listener on an input field?

南楼画角 提交于 2021-02-07 14:30:35
问题 In the simplest test possible, I'm attempting to test the following function: addPercentSign: function (oEvent, control) { var inputVal = oEvent.getParameters().value; var inputNumber = parseFloat(inputVal); if (inputNumber) { if (inputNumber < 50 || inputNumber > 100) { //see learningCurveFormatCheck return null; } else { var finalVal = inputNumber.toFixed(1); var finalOutput = finalVal + "%"; control.learningCurve.setValue(finalOutput); return finalOutput; }; } } The above function is an

Opening facebook connect window via javascript?

左心房为你撑大大i 提交于 2021-02-07 14:30:33
问题 When someone tries to login to my site via facebook, he's redirected to a page where he sees all the requested permissions and click to allow / disallow them. Is there any way to have this page open up as a layered window through javascript without having the user leave my website? E.g so my website would be in the background while the facebook connect window hovers above it. Any ideas at all? 回答1: The answer is no. Also, you can't load the login page within an IFrame since Facebook has a

How to Set minimum and maximum date dynamically in jquery UI date picker

怎甘沉沦 提交于 2021-02-07 14:28:27
问题 I have put two datepikcer from date and to date in my webpage for generate report. I want to apply validation on both datepicker for selection of date. I have write common jquery code for set minimum and maximum date of both datepikcer but it did not work for me. I have also write code for set minimum and maximum date on close of datepicker. My requirement is that I want to set minimum and maximum date dynamically when datepicker is initialize. Then after also set another maximum and minimum

How to Set minimum and maximum date dynamically in jquery UI date picker

∥☆過路亽.° 提交于 2021-02-07 14:27:07
问题 I have put two datepikcer from date and to date in my webpage for generate report. I want to apply validation on both datepicker for selection of date. I have write common jquery code for set minimum and maximum date of both datepikcer but it did not work for me. I have also write code for set minimum and maximum date on close of datepicker. My requirement is that I want to set minimum and maximum date dynamically when datepicker is initialize. Then after also set another maximum and minimum