how to design a simple one page website - html

i want to design a website who contain 4-5 page but i need a feature then when user click on any link the content is changed without any other page load. how i can do this
my page look like this
but when user click on left side or right side link the content is load without page refresh. how i can do this.

jQuery UI tabs?
http://jqueryui.com/demos/tabs/default.html

You can either use frames or load content via Ajax.

Related

wants that when I click on the any index hyperlink, then it is displayed on main description page

I have made an web page. There are two iframes
In it. First is of index and second one is description page. I want that when I click on the any index hyperlink, then it is displayed on main description page.
How it will be possible? please give me the HTML code
You can use a button and when clicking it, change the url of the iFrame using Javascript like this:
document.getElementById('iframe-id').src = newLink;
You can use the data-attribute to store the wanted link in your html.
In case you want to do that: It is not possible to react to things outside of an iFrame through an iFrame. So you cannot put a link in iFrame1 and have it reload iFrame2, because those are two different websites and don't see each other.
Now, idk what exactly you are planing to do, but I really hope, that you don't want to make your entire site like that. Using iFrames is really only useful for things like inserting widgets (like Codepen etc.), but should never be used to display information from your own site. If you don't want to copy your html for every site then use PHP. If you don't want to reload your entire webpage (which is pretty much never a problem) you can use AJAX-requests to load parts of your website. (Frameworks like React.js, Angular.js and Vue.js do that for you)

HTML preserve header when loading another page

I am building a website and when I click on one of my header's page links, it loads the whole page again, rather than preserving the header and only loading the main content. For example:
When you click on a button on the sidebar of YouTube, it will, for example, load the watch later playlist, and preserve the search bar and sidebar. How would I go about doing this on my website?
Have a look at using aJax. This should resolve your issue.

How is the facebook ticker design implemented?

I know the backend detail,that it works using long polling.
I am more interested in knowing how the sidebar is persistent through different pages.
The sidebar is not being loaded again,when a new link is created.How could this be implemented.
You can handle the link clicks with Javascript. Once you get a click, you would only change the main content (whatever the main div or block is) and keep the sidebar intact. So, it's kind of like "pseudo-links." I don't think you actually go to another page, but the content of the current page is changed.
Handling URL change with Javascript.
How to change the URL in the browser. (Facebook changes the address bar URL without actually loading the page.)

Convert Site with messenger to work like facebook

Hello I'm creating a site at the moment (asp.net mvc) which has a div at the bottom side of the page that works as a messenger.
I would like to find a way to make the site work like facebook's chat. In other words, when a user clicks on a link on the site to load the content on the back however the messenger to stay in tact without loading again.
Will I have to change the site so every page is loaded with an ajax request? Also, I don't want to use iframes.
The only way to have elements to stay on screen from page to page without using iframes to use ajax requests, something like load() if you're uisng jQuery.
Most sites that do it use some variation of hashbangs, so a page can be loaded by directly entering it's url, rather than necessitating a path through other pages.
To do what you propose has fundamental implications to the structure of the entire site, so if this messenger box isn't anything more than a gimmick, I wouldn't bother. I'd even go so far as to say that if you're not sure how you'd do this one thing, you shouldn't be trying to build a site around it.
Well if you dont want your chat to disappear even for a moment with full site refresh, then yes, you have to change your page to ajax loading. It is not such a pain as it looks - for example use jquery to intercept all clicks on anchors, make ajax call to their href, and replace some "all-wrapping" placeholder div with the returned content.. Not very pretty usage of ajax, but it works, and your chat stays in place.

f5 - refresh only the frame

Is it possible to refresh only one frame in the windows and not all the frames?
My problem is that i have a page index.php and inside there are two frames - menu and content. when the user clicks on refresh(f5) the index.php has been loaded again and the content page is blank.
What can i do?
If you are familiar with javascript's usage in page refresh. You can try that instead of traditional html do a job.
javascript:location.reload(false)
will do a page reload from the cache. Set this to your content page and for menu page you can set this.
javascript:location.reload(true)
What you can do is store the last page selected by the user in cookie (using client side code) then in the page load even (client side again) check for that cookie and if exists, load that page by default instead of showing blank page.
Using jQuery accessing cookies becomes really simple: http://plugins.jquery.com/project/Cookie