I want to transmit a parameter (path of images) to a page using anythingSlider witch load e series of images.
this html page work fine. But when i call from another page that not work.
I have two pages:
the fisrt page do;
$.ajax({
type: "GET",
async: false,
cache: false,
contentType: "application/json; charset=utf-8",
url: 'Slider.html?name=appart/imgs',
dataType: "html",
success: function (result) {
alert("Result--->"+"\n" + + result);
$("#idDivSlider").html(result);
$("#idDivSlider").show();
},
error: function (result) {
var err = result.status + ": " + result.statusText;
alert(": Loading Header: " + "\n" + err)
SetPageError(thatModule + ":Loading Header ", err);
return null;
}
});
The second page receive the parameters ?name=appart/imgs
function getParameterValues(param) {
var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
alert("getParateleters Function: " + url); // rteurn only the name of the caller page ?
for (var i = 0; i < url.length; i++) {
var urlparam = url[i].split('=');
if (urlparam[0] == param) {
alert("getParateleters: " + urlparam[0]);
return urlparam[1];
}
}
};
but when i code :
pathFilesImg = getParameterValues("name");
I use ajax call feqently, with php or services database and generally it work fine.
in this csae i dont understand why?
somme helps ?