Hi there,
I'm new to this forum and am trying to find answers to a few issues I've been having.
I'm building a website for my music (I'm a novice with web design so bear with me) and I'm having trouble with this page - www.rjt-online.com/photos.php
As you can see, when you click on the "Filter By" buttons, the relevant gallery opens in the iFrame and the Titles (such as Latest Photos and Live Photos) are altered onclick by using the changeText function. The problem with this is that when I use the browser "Back" button, the iFrame goes back, but the "changeText" doesn't go with it.
So I've been trying to find solutions to this. Someone on another forum suggested hiding the album titles in a hidden element on each gallery page, and the title in when you click on the Filter By buttons. They suggested first putting some code such as:
<input type="hidden" name="AlbumTitle" value="Live Photos">
...in each page that is to be loaded into the iFrame.
They then suggested putting some code such as:
$("#iFrameId").load(function (){ // executes the function when the contents in iframe with id "iFrameId" is loaded.
$pageName = $('[name=AlbumTitle]').val() // assigns the value of the hidden field to a jquery object $pageName.
$('#phototitle').html('$pageName') // populates the element with id "phototitle" with the value of the $pageName object.
});
...into the jquery js script on the photos.php page.
I've tried this but it doesn't seem to want to work.
Any help would be great!
Thanks.