Calling a method from a dropdown control

D

Doogie

Are you binding the combo box every time the page loads even if it being

That was my problem, kind of. My code to fill the dropdown list is in
my page load of my user control and was happening regardless of it was
a post back or not so was going to the db and getting the data to fill
the dropdown everytime. Once I modified that to only occur when not
doing a post back, everything is working fine.
 
B

Bala murugan

hi!

<select id="cbCarriers" onchange="return test();">
<option value='241'>3gp</option>
<option value='441'>aac</option>
<option value='1115'>ab1</option>
</select>

<script type="text/javascript" language="javascript">
function test()
{
alert("this");
}
</script>

Note: i have made slight changes in script tag
try with this code
 

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