From 1st page I pass 2 parameters http://in164263:5050/csm/csminfo.jsp?cfgid=48&filepath=files/csmclientbuckeye.xml
How to read the request parameter in csminfo.jsp and get xml file from filepath?
I suppose for reading and parsing xml I can us something like this
$.ajax({
type: "GET",
url: "sites.xml", //here i want to read request parameter `filepath`
dataType: "xml",
success: function(xml) {
}
});
The problem is i am passing the filepathon onLoad of page’s body, so the spry region tries to load itself through the dataset(which is not yet initialised) but since it does not have the path yet it is not displayed. So how can I get the filepath before onLoad so that spry:region gets this filepath?
With JSP you can use something like this to setup properly your ajax call
Otherwise, if you really NEED to read the get or post parameters via javascript (jQuery), you can follow this answer :
how to get GET and POST variables with JQuery?