javascript - How can I append to a select drop down that lives on another page? -


I'm working on creating a service that allows you to create team or user-based challenges. Using the HTML5 specifications to design, I raised an issue by adding a drop down list in any other page. Completely the functionality stays in two pages, mainly by making AJAX calls to other pages. There is a small function that adds two properties of a team to the drop down list, but I do not seem to be working it properly.

Code:

  var teams = $ .ArajSASNA (Millennat teams ()); $ ('# Multipurpose') Load ('Select All Times 2.html # Text'); For (i = 0; i ") AppendTo ('# teamSelection'); }}}   

#teamSelection #teamSelect div is contained within any help would be great. Adding a callback function within

.load () will solve the problem. Actually, you are saying that before the walk to the loop everything loads in that div.

  $ ('# multipurpose'). Load ('allTeams2.html #teamSelect', function () {For (i = 0; i & lt; teams.length; i ++) {var team = $ .parseJSON (getTeam (team [i]); if (Team.ownerID === userID) {$ ("& lt; option value =" 'team.teamID + "'>" + team.teamName + "& lt; / option & gt;") .appendTo ('# Team Selection');}}});    

Comments