Jump to content

If - Then Procedure Is Not Working In (Update) Datapage Footer


Recommended Posts

Normally this procedure must work in the footer of a update datapage form, so when the virtual1 checkbox is checked, then add +1 to the total of field...

 

The procedure to add +1 to the fields total is working...

 

When adding the If-Then procedure it stops adding, with or without the checkbox checked....

 

If anybody can help me with this?

 

Thanx

 

 

 

 

<SCRIPT LANGUAGE="JavaScript">

// ParsInt script is tested en working (adding each time +1 to value Kip_met_Marokkaanse_kruiden)

function add()
{

var totalVal = parseInt((document.getElementById("EditRecordR393_Kip_met_Marrokaanse_kruiden").value)) + (+1);

document.getElementById("EditRecordR393_Kip_met_Marrokaanse_kruiden").value=totalVal;

}

function is_checked_and_change()

{

   var is_checked = document.getElementById("cbParamVirtual1").checked;

   if (is_checked)
      {

         document.getElementById("caspioform").onsubmit=add;

      }

}

</SCRIPT>>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...