www.webdeveloper.com
Results 1 to 2 of 2

Thread: Calculations not working in form

  1. #1
    Join Date
    Feb 2009
    Posts
    14

    Calculations not working in form

    Hi again... bet you thought you got rid of me, eh?

    I wrote my first form (txt file attached) which includes formulas in some fields which are supposed to populate with the result. It worked fine for about 2 days then stopped completely. Suspecting foul play I reloaded my backup copy but it still didn't work.

    Sooo, I checked all my permissions and tried it on different browsers to no avail. Here are the issues:

    1) The user should be able to input info in some fields with which another field does a calculation and displays the result. It worked before but isn't now.

    2) Even when it DID work, each field had to be clicked for focusing which is something I want to avoid if possible.

    It would be incredibly helpful if one (or all) of you could PLEASE look over this (I know it's long...sorry) and correct it for me, then tell me what happened? Even if you don't want to correct it for me and send it back would you PLEASE tell me specifically what to change?

    Thank you!
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Move the form tags out of the table. Validate! eval is evil
    Corrected lines:
    Code:
    getObj('f_LM63ZAR67GOQ').onblur = function() {try{eval("getObj('f_E3KLFTL8QHGY').value= parseFloat(getValue('f_LM63ZAR67GOQ'))-parseFloat(getValue('f_KR6H292K7712'));");}catch(ex){ }
    		};
    		 
    getObj('f_KR6H292K7712').onblur = function() {try{eval("getObj('f_E3KLFTL8QHGY').value= parseFloat(getValue('f_LM63ZAR67GOQ'))-parseFloat(getValue('f_KR6H292K7712'));");}catch(ex){ }
    		};
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles