JS Calculator

I have just created a calculator that can be invoked in a page. Currently, the key combination for invoking the calculator is the Ctrl Windows key. This shows and hides the calculator. The calculator has a text area and the user can type in an arithmetic (Validation is pending for non arithmetic keys) expression and on enter key, the same is evaluated. Here is the code ============================= <html> <head> <script language="javascript"> document.onkeyup = KeyCheck; var calcVisible = false; function KeyCheck(e) { var KeyID = (window.event) ? event.keyCode : e.keyCode; switch(KeyID) { case 91: if (!calcVisible) ShowCalc('CalcPlace') else HideCalc('CalcPlace'); break; default:

Continue reading

Handling onPropertyChange in Firefox

IE non-standard onPropertyChange is a huge problem in most of the places. I was working on a work of moving an application designed to work on IE to a cross-browser standard. For some of the forms, there is a pop up and on the close button of the pop up, it used to update some of the fields in the opener page as:     function fnClose(rowid){         var taxHTML = document.getElementById("taxvalues").innerHTML;         window.opener.document.getElementById("taxvalues").innerHTML=taxHTML;         window.opener.document.getElementById("hdnTax").value=rowid;         //There is a event handler on this element in the opener using "onPropertyChange=fnPopClosed(this.value);"         window.close();     } There is

Continue reading