I have a web application developed in VS 2008. On a form, I have a <select> control that looks like this:
When make a selection from this control, the script DisablePrintSchedule() should fire but it doesn't. Below is my Javascript.Code:<select id="lstreports" class="width_280" size="1" name="lstreports" onserverclick="DisablePrintSchedule()" runat="server">
The first Alert isn't even executing. Is there anything I need to do in the code behind like Register the script?Code:<script type="text/javascript"> function DisablePrintSchedule(){ alert('Made it here!'); var btn = document.getElementById('btnPrintSchedule'); alert('Made it here too!'); if (btn.attributes("SelectedIndex") == 2){ alert('Print Schedule!'); } else { alert('Don\'t Print!'); } } </script>
Thanks,




Reply With Quote