I am going nowhere with this since last three days.
I have a website with Right column and left column and center area. On the Right column I have Student searches with different criteria.
I have button "LoadSearch" that loads my user controls on Right column.
All the scripts related to Right column are placed StudenSearches.js file.
My document.ready is as follows, which loads my searches and loads my select options based on other selections. However this works only once ... the first time page is refreshed this works amazing. When first clicked on Load search button, it loads all my select options. When clicked on second time it doesn't load the select options.
$(document).ready(function (){
$(":input", GetSubjectSearch()).bind("keydown", function () { setTimeout(function() { SubjectChange(this); }, 4); })
.bind("change", function() { setTimeout(function() { SubjectChange(this); }, 4); });
$(":input", GetwildSearch()).bind("keydown", function() { setTimeout(function() { wildSearchChange(this); }, 4); })
.bind("change", function() { setTimeout(function() { wildSearchChange(this); }, 4); })
.bind("paste", function() { setTimeout(function() { wildSearchChange(this); }, 4); });
GetYear().bind("change", function() { YearChange(this); });
GetDepartment().bind("change", function() { DepartmentChange(this); });
GetBranch().bind("change", function() { BranchChange(this); });
GetClass().bind("change", function() { ClassChange(this); });
GetSection().bind("change", function() { SectionChange(this); });
$("#btnNew").button().click(ShowNewcontents);
});
Those functions in document.ready area stuff that initializes my select options. So Forexample
Year Deapartment
Branch class
are four select options that gets loaded when document.ready is executed. Now on a button click event, I have to reload everything in document.ready. So I created a function and called that on click event of button. However it doesn't load my select options when I click button for second time because page is not being refreshed on that click
What I have tried:
I have tried windows.load, widnows.addeventlistener and what not. But nothing seems to be working on second time without page being refreshed.
I really appreciate if someone can help me in this