Difference between revisions of "JavaScript"

From LongJump Support Wiki
imported>Aeric
imported>Aeric
Line 8: Line 8:


===Accessing Record Variables===
===Accessing Record Variables===
You access record data using the Document Object Model (DOM). Using the
[[Sample Order Processing System]], you might access a field in an OrderItem
record like this:
:<syntaxhighlight lang="javascript" enclose="div">
var val =  document.getElementById("item_quantity").valu;
</syntaxhighlight>
Or, using {{jquery}} functions to shorten the syntax:
:<syntaxhighlight lang="javascript" enclose="div">
var val = $('input[name=item_quantity]').val();
</syntaxhighlight>


===Accessing Variables in Lookup Records===
===Accessing Variables in Lookup Records===

Revision as of 21:39, 7 October 2011

This page provides general notes on using JavaScript in the platform.

About JavaScript

JavaScript is an object-oriented language that allows for functional programming. It is the language that drives much of the world wide web.

Learn more:

Accessing Record Variables

You access record data using the Document Object Model (DOM). Using the Sample Order Processing System, you might access a field in an OrderItem record like this:

var val =  document.getElementById("item_quantity").valu;

Or, using Template:Jquery functions to shorten the syntax:

var val = $('input[name=item_quantity]').val();

Accessing Variables in Lookup Records

Using JavaScript in the Platform

JavaScript can be used in a variety of ways

Reference Information