Firefox doesn’t recognise innerText property. Below is the fix. var AmountLabelControl = document.getElementById(‘lblAmount’); var amount; if (AmountLabelControl.textContent) { // Firefox… amount = AmountLabelControl.textContent; } else if (AmountLabelControl.innerText) { // IE… amount = AmountLabelControl.innerText; } Thant Zin Oo
We cannot directly simulate click event in Firefox. Add the following code to register mouseclick event for the button. HTMLElement.prototype.click = function() { var evt = this.ownerDocument.createEvent(‘MouseEvents’); evt.initMouseEvent(‘click’, true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null); this.dispatchEvent(evt); } Then, you may call the event in Firefox as if you [...]
© Thant Zin Oo. Powered by WordPress using the DePo Skinny Theme.