Help with my webpages

ace777

Fully Optimized
Messages
3,110
I'm designing a webpage, its been quite a while since I have made them, I remember making one that was split, into two separate pages in the same window, does anyone have the HTML code for that? The main idea here is to have music playing while you search the site so it doesn't restart every time you load a new page.
 
There are multiple ways of doing this.... The "best" way would proberbly be to use AJAX to just load new content into the page when you click on a link. The other way would be to use a Frameset... But they are being phased out really, and arnt looked on very highly.
 
ok, I'm really basic in javascript, is there anyway to copypasta the mp3 and the other page links into an existing script? if not how do you set page frames, This is for nothing big, its a site for me and about 25 other people to use.
 
I believe what you are referring to is frames.
Here is an explanation: http://www.w3schools.com/htmL/html_frames.asp.
I would STRONGLY advise against using frames, since many browsers have compatibility issues with displaying them.

The other option is using an iframe (essentially the same thing, still not supported well, but more so than traditional frames).
Here is a link: http://www.w3schools.com/TAGS/tag_iframe.asp.

The problem you run into here is the stateless nature of the http protocol. If you were to use ajax, it would have to be part of a much larger solution than copy-pasting some code.
Take this website for example:
2 Advanced
The music remains (without re-loading) on every page, BUT...
The entire page is flash. While their appears to be a re-load of the whole page, closer inspection of the url on each page reveals that you are still looking at the same page. As a rule of thumb for me: Unless the audio is loaded into an swf and pre-loaded properly, don't use audio on your website. Partially because you run into codec problems and bandwidth problems. The ajax requests for returning an audio file would most likely kill any bandwidth limit you have setup with your ISP.

Hope this helps. Let me know if you have any other questions/concerns.
 
I'm not suggesting that the audio file be loaded dynamically, just the text content for the site.
 
Back
Top Bottom