Jump to content

Having an iFrame that stays on the page no matter what.


mattal999

Recommended Posts

Hi guys,

 

I am trying to code a website that will end up kind of like www.we7.com.

 

Now I am trying to have my mp3 player (a seperate file) always on the page no matter where you navigate to without refreshing for continuous play.

 

This website does this brilliantly, but I can't seem to find a way to replicate it without making the page refresh. I have no code at the moment to show you, but how can I do this?

 

Thanks,

 

mattal999.

Link to comment
Share on other sites

Yeah, I was going to do that, but then the page location at the top wouldn't change, and that wouldn't be very handy for URL sharing (which is a key part in this site).

 

I'm thinking of doing this:

 

Use Javascript to grab any content after a #/ in the url and use that to load a page using ajax or something like that?

Link to comment
Share on other sites

[sorry Mods, can't edit the above post for some reason :P][/sorry]

 

Ok. Good news. I've managed to code some Javascript that loops through all hyperlinks in the page and gives them an onClick value. Now all I need to do is make the ajax on the function that is called (onClick()) that loads the new page into a div.

 

Looks like its gonna be a good day!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.