//Hook change for each option to an event
<asp:Content ContentPlaceHolderID="ScriptPlaceHolder" ID="Scripts" runat="server">
<script type="text/jscript" language="javascript">
$(document).ready(function () {
$("#listSamples").change(function (event) {
if (this.value == 'RunSampleA') {
RunSampleA();
return;
}
if (this.value == 'RunSampleB') {
RunSampleB();
return;
}
if (this.value == 'RunSampleC') {
RunSampleC();
return;
}
if (this.value == 'RunSampleD') {
RunSampleD();
return;
}
}
)
}
);
script>
asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="div_content">
content;
<select id="listSamples">
<option value='NULL'>Choose Sampleoption>
<option value='RunSampleA'>Run Sample Aoption>
<option value='RunSampleB'>Run Sample Boption>
<option value='RunSampleC'>Run Sample Coption>
<option value='RunSampleD'>Run Sample Doption>
select>
div>
asp:Content>
No comments:
Post a Comment