I get an error on this line in IE8 with the Not Implemented error. How do i execute this line on other browsers and have IE8 ignore this?
window.onbeforeunload = function () {
This is weird. Theres nothing inside of this that should cause an error. This script is loaded at the end of body so all html exist and moving this code to the bottom on the file solved it. why?
window.onbeforeunload = function () {
var txtbox = $('.box textarea').eq(0);
var txt = txtbox.val();
var btn = $('.box button').eq(0).html();
if (btn == "Thank You")
return;
if (btn == "Sending")
return "not complete";
if (txt != '') {
return "blah"
}
return;
}