Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2235
javascript - Before SelectChange issue.
posted

I am using this function to popup a confirmation when someone makes a change in a webcombo box.

 

function wcPerCitizenship_BeforeSelectChange(webComboId) 
			{
			var mywebcombo = igcmbo_getComboById(webComboId)
			if (!confirm("Are you sure you want to change this?"))
			return true;
			}

Problem is it runs everytime. Twice...
So if something is in a combo box, and a user clicks the drop down to change the value, it prompts then prompts again.
Same thing happens if nothing is in the box.
How do I make it only work once?