Jump to content

Java Script Question

Recommended Posts

To make the script below usable on a datapage that allows updates to a record, is it as simple as changing InsertRecord to EditRecord? Or does something esle need to change?



function calculate()


/* Retrieve the value of the field Height and store in a variable 'v_height' */

var v_height = parseFloat(document.getElementById("InsertRecordHeight").value);

/* Retrieve the value of the field Width and store in a variable 'v_width' */

var v_width = parseFloat(document.getElementById("InsertRecordWidth").value);

/* Multiply the value height and width to obtain the value of 'v_area' */

var v_area= (v_height * v_width);

/* Insert a rounded value of the variable 'v_height' into the DataPage field Area */

document.getElementById("InsertRecordArea").value = Math.round(v_area);


/* On submitting the webform, the function calculate is executed */


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.

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.

  • Create New...