Server JSvia Work with documents and fields on the XPage (http://xpageswiki.com/web/youatnotes/wiki-xpages.nsf/dx/Work_with_documents_and_fields_on_the_XPage#Get+and+set+a+field+on+the+XPage)
getComponent("elementName").getValue();
getComponent("elementName").setValue("something");
Note: you cannot access or set fields with visible=false. If you want to work with a field, but don't want to display it, give the field a CSS class with "display:none".
Get submitted value before validation
getComponent("elementName").getSubmittedValue()
Client JS
document.getElementById("#{id:elementID}").value;
Get a computed field's value:
document.getElementById("#{id:elementID}").innerHTML;
if (getComponent("Abeginn_11") == null) {
var x = 0;}
else {
_dump(getComponent("Abeginn_11").getValue);
var a = getComponent("Abeginn_11").getValue();
var start:NotesDateTime = session.createDateTime(a);
}