I’m not that familiar with the JS functions that are not applicable for firefox, thus i i’m posting here to ask you guys on what is wrong with my code. works on any other browsers except firefox.
var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr = document.all.item("printable").innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr+footstr;
window.print();
document.body.innerHTML = oldstr;
return false;
I did some reading and all i got was that document.focus is not applicable for firefox, but i’m not using that line of code so i’m a bit lost as to what is causing my problem. thank you all.
what happens is it does nothing at all, tried to do an alert just in case and it worked fine (commented all that code of course and only left the alert).
Firefox does not print anything, because an early error is thrown.
document.allisundefinedin Firefox. Upon opening the console, the following error message should become visible nearvar newstr = ...: