If you are unable to create a new account, please email support@bspsoftware.com

 

Check to see if a user has made a selection in Checkbox using Java Script

Started by gosoccer, 15 Feb 2014 04:00:00 PM

Previous topic - Next topic

gosoccer

I have to develop a small java script that verifies if a checkbox is selected by the user or not. If no selection is made, I need to raise an alert and having the user return back. I thought the following would work but it doesn't looks like it.

Quotefunction poolidcheck() { var f = getFormWarpRequest(); var c=f._oLstChoicesOrgCheck; var i; for (i=0;i<c.length;i++) if (c.checked) { alert("true") promptAction('finish'); } else { alert("false") break; return false; } }
and inside the main function of my java script, I have the following,

Quote} else if ( poolidcheck()) { var msg = 'PLEASE CHECK AN ORG '; alert(msg);

Could someone please help!!@