This is probably very simple but I'm stumped. I want to determine the type of object I'm manipulating using javascript. So if I have a function that takes an object as a parameter how can I tell if the object if a button, radiobutton, checkbox, etc.... I've tried
Actually, I have the same dilemna myself, and .className only ever seems to return a value of "field" for any given 'field'. What I'd like to know is what kind of field it is (e.g. date/time, decimal, numeric, textfield, etc.). Anyone know if this is possible?
What about the JavaScirpt 'typeof' special operator or the '.type' of field property? But since one can not tell the exact format of a text field since this can be dynamic, that is changed on the fly during another scripts processing. One could always examine the "formattedValue" and try to sort out the fields formatting.
The real solution is simply documentation or the use of PFN, Polish Field Notation.
Polish or Hungarian notation might work, but I'd probably have to redo all of the bindings on the xsd I'm using and possibly on the backend. I'm thinking I'll probably use Regular Expressions to assist me in the usage of the formattedValue to drill down to the most specific of field types.