I'm looking for a way to access the Query String of a page that has been loaded into a div, through jquery or javascript.
The reason is that I need to modify how the page calls a function based on whether a parameter has been loaded into the page or not.
I've tried this inside the page that has been loaded into the div
var fileIDPresent = false;
var url = this.window.location.href;
alert(url);
if (url.indexOf('?' + 'FileID' + '=') != -1)
fileIDPresent = true;
else if (url.indexOf('&' + 'FileID' + '=') != -1)
fileIDPresent = true;
The page is loaded into the div through the following code:
$('#loadedContentHolder').load('/ViewDetails.aspx?FileID=' + File, function () {
// load finished...
$('#loadedContentHolder').slideDown('slow');
});