I have a PHP page that uses a $_GET['file'] to determine what is outputted on the page. On a page called index.php I use a jQuery ajax function to load the PHP page inside index.php like so:
$.ajax({
url: "data.php",
data: {file: 'folder/'},
success: function(data) {
$('#remote-files').html(data);
}
});
Think of this as a server file browser, (shows the files and folders on the server). The data variable above determines that it should start in the folder named 'folder'. Now it will display a bunch of folders and files on the page that are inside the folder named 'folder'. What I want to do is be able to click one of the folders inside 'folder' and go into that new folder. Now the problem is, with the function above it almost seems to cancel out the javascript below it, because under that script I have a function that when the user hovers over a folder, the background color changes, (this is done with jQuery), but when the script is there, the background doesn't change on hover, but if I add a alert('hi');
under the above function, it will work.
So basically Im asking is there a way I can be able to click on a folder, and update the $_GET['file'] variable without refreshing or reloading the page, just update the loaded page?