Check control type in script

T

tmapola

Hi,

Is it possible to check the type of a control in script? For example,
I have the following:

oError = XDocument.Errors(0);
oNode = oError.Node;
try
{
XDocument.View.SelectText(oNode);
}
catch(e)
{
XDocument.UI.Alert(e.message);
}

I want to set the focus of a form to the control that is causing the
error, but some are text boxes and some are combo-boxes. SelectText()
works for text boxes, but not for combo-boxes, where I have to use
SelectNode(). Only problem is I don't know how to check what type of
control it is so that I can call the right method.

Any suggestions?

Tracy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top