/    Sign up×
Community /Pin to ProfileBookmark

Updating url to reflect frame location?

Hey everyone,
I’m currently developing a new website and I’m having a little bit of trouble.

I have a main page (index.php) and I’ve got a frameset inside of it, like this:

[code=html]
<frameset cols=”*,200″>
<frame src=”frame1.php” noresize=”noresize” />
<frame src=”music.php” id=”mp3player”/>
</frameset>
[/code]

The frame on the right is an mp3 player which is permanently there, and the frame on the left fills the rest of the page with the actual website. The user can navigate around the whole website just fine without interrupting their music.

The only problem I’ve got is that I can’t seem to update the browser url to reflect the url of the first frame, I can’t even update the hash.
If I modify the hash of the index.php through any of the following means:

[CODE]
parent.location.hash = “mynewhash”;
location.hash = “mynewhash”;
window.location.href = “index.php#mynewhash”;
location.href = “index.php#mynewhash”
[/CODE]

Using any of those to update the hash causes index.php to reload the frames inside.

Is there anything I can do to have index.php reflect the location of frame1, or atleast have index.php in a way that I can bookmark a page?

Thanks!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@jordanmooreauthorJul 30.2011 — Nevermind!

I've switched to using a table layout and placing an iFrame within the 2 columns - this seems to be working great.
×

Success!

Help @jordanmoore spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...