Mitchel Stuart Fountaine Mitchel Stuart Fountaine - 1 year ago 90
Ajax Question

Function not working after updatepanel triggered

I have this function on the same page that makes use of UpdatePanels

$(function() {
$("#listTimeInput").change(function() {

function ToggleDropdown() {
if ($("#listTimeInput").val() == "1") {
} else {

This function works fine when the page is loaded, however after the UpdatePanel is triggered the function no longer works.

I am very new to JavaScript and am not sure if I need to wrap this code into the document.ready statement. I'm also not sure where that would go.

Any and all help would be appreciated.

Answer Source

use following approach..

function pageLoad(sender, args)

   // put all your javascript functions here 


or referred to link

After postback my JavaScript function doesn't work in ASP.NET