javascript - Get the url of xml with jquery -
i have button gets current url, url sought within xml, return url1 redirect. what's problem?
$(document).ready(function () { $("#leerxml").click(function () { var urlactual = document.location.href; $.get("students.xml", {}, function (xml) { $(xml).find("urldirige").each(function () { if ($(this).find("url").text() == urlactual) { //do document.location.href = $(this).find("reserva").text(); } }); }); }); });
Comments
Post a Comment