Read/Pass Checkbox Value in Script

E

eczino

I need to be read the value of a checkbox, and pass that value to an
OnClick event of a button in the form, and then display a confirmation
box if the box is not checked. I can't find anything that clearly
spells out how to do this, or if it is even possible. Here is what I
have, and it does not work.

{
// Write your code here

var subtoManager = XDocument.DOM.selectSingleNode("/po:purchaseOrder/
my:SubmittedByManager");

if (subtoManager.Value = FALSE)

{
XDocument.UI.Confirm("Do you wish to continue?", 4);
}

}


This is the OnClick event of my button. If the SubmittedByManager
checkbox is not checked, I want to display a confirmation box.

Thank you for any help anyone might be able to offer.

Elliot
 
S

Shekar(GGK Tech)

Hi
In the If condtion you have used assignment operator(single '=') that might
be the cause for the problem, I have modified the code.

var subtoManager =
XDocument.DOM.selectSingleNode("/po:purchaseOrder/my:SubmittedByManager");

if (subtoManager.text == "FALSE")

{
XDocument.UI.Confirm("Do you wish to continue?", 4);
}
Hope this helps you
 

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