var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Accessing a control in a form
One way to do it is of course
However, can we access it differently?
What about formname.item("controlname")?
It doesn't work though.
I've tried in
if(IsEmpty(frm1.FirstName)) would work fine
//if(IsEmpty(frm1.item("FirstName")) doesn't work
The problem with frm1.FirstName is that the control name cannot contain space. I want a control name that contains space like First Name instead of First Name.
I'm not sure what programming language you are using but the reason why variables contain no spaces is because it is harder to distinguish between one variable or two if spaces are allowed.
Say you have 3 variables:
and you want to print First Name. Well printing First Name might print First and Name, but not variable First Name. Was that confusing? Exactly why we don't want spaces in variables... or controls.
I use document.getElementById() for everything. I would also discourage you from using whitespace in variables. I mean what if you want to write your back end in this?