Hello , I am doing a football projekt and could use some help. When selecting a team "Chelsea" for example, I want to import a XML file with names of all the players into the player section with Jquery. Any help would be much appreciatet !.
HTML Code:<DOCTYPE html> <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="ajax.js"></script> </head> <body> <fieldset style="width: 50%;"> <legend> Formulär </legend> <form action="javascript: void(0);" method="post" id="football"> <label for="chooseteam">Choose Your Team:</label> <select id="teamid"> <option value="0">Choose Team</option> <option value="1">Chelsea</option> <option value="2">Madrid</option> <option value="3">City</option> </select><br /> <label for="chooseplayer">Choose Your Player:</label> <select id="player"> </select><br /> <input type="submit" name="submit" value="Log In" /> </form> </fieldset> </body> </html>
HTML Code:<?xml version="1.0" encoding="utf-8" standalone="yes"?> <response> <kommunidLabel>Chelsea</kommunidLabel> <kommun playerid='0'></kommun> <kommun playerid="1">Hazard</kommun> <kommun playerid="2">Lampard</kommun> <kommun playerid="3">Mata</kommun> </response>


.
Reply With Quote
Bookmarks