...

View Full Version : Multi-page article with same url



jackuars
01-25-2012, 06:00 PM
Hi, I am new to HTML and I would like to know, how do I create a multi-page article with the same url. Am creating an article and the content length is so big that I want to divide into two pages so that it doesn't get cluttered. So the continuation of page 1 is going to be in page 2. But as I create a new page, I want the url of both of them to be the same and by clicking the 'next page' hyperlink at the bottom of the first page, it should go to the second. How can I do this.

felgall
01-25-2012, 08:51 PM
For it to work for people who don't have JavaScript enabled you will have to make each page a separate file which therefore will have its own URL.

The simplest way then to get the same URL to appear in the address bar for both pages is to set up a third page that displays the content of those two pages inside an <iframe> or <object> tag. Then only the URL of this third page will display as the address.

teedoff
01-25-2012, 08:55 PM
You could incorporate some ajax to dynamically display different content at any given time. Several different options at dynamicdrive.com (http://dynamicdrive.com)

No page change or page refresh.

felgall
01-25-2012, 10:20 PM
No page change or page refresh.

Except it will not display the second page for anyone without JavaScript without needing to give it a different URL which would then make that second page accessible separately to everyone.

teedoff
01-25-2012, 11:33 PM
Except it will not display the second page for anyone without JavaScript without needing to give it a different URL which would then make that second page accessible separately to everyone.

You are correct. I hadn't read your initial response when I posted mine. And I didn't see whether the OP specified they didn't want to use js/ajax.

Excavator
01-26-2012, 01:49 AM
Hello jackuars,
Why not a page anchor? The markup on your end would be a single .html document but half of it could be hidden until the viewer clicks the "next page" link.

See page anchors here (http://nopeople.com/CSS%20tips/page%20anchors/index.html).

felgall
01-26-2012, 02:46 AM
Hello jackuars,
Why not a page anchor? The markup on your end would be a single .html document but half of it could be hidden until the viewer clicks the "next page" link.

See page anchors here (http://nopeople.com/CSS%20tips/page%20anchors/index.html).

You'd only be able to actually hide it from those with JavaScript enabled if you did that. Otherwise those without JavaScript would be unable to unhide it.

Excavator
01-26-2012, 03:10 AM
You'd only be able to actually hide it from those with JavaScript enabled if you did that. Otherwise those without JavaScript would be unable to unhide it.

No, the anchors are styled with CSS and you could place the second page wherever you like. The only js on that example is a page transition and the usual html5 crap.

felgall
01-26-2012, 06:43 AM
No, the anchors are styled with CSS and you could place the second page wherever you like. The only js on that example is a page transition and the usual html5 crap.

Yes but that code only demonstrates one page. It doesn't have a second page that displays using the same URL but only when you click on the link to go to that page. To make it work with a second hidden page without changing the URL you'd need either JavaScript or the frames that I originally suggested. Just that code by itself doesn't allow you to display two different pages using one address it only allows you to jump around within the one page.

jackuars
02-02-2012, 08:07 AM
Hello jackuars,
Why not a page anchor? The markup on your end would be a single .html document but half of it could be hidden until the viewer clicks the "next page" link.

See page anchors here (http://nopeople.com/CSS%20tips/page%20anchors/index.html).

Page Anchor is a good choice and easy to set up. But on clicking the "next page" does it show the contents of the previous page upon unhiding the next page. I don't want that. I only want the contents of the 2nd page to appear.

Thank you for the helpful replies and sorry for late posting

jackuars
02-02-2012, 08:11 AM
Yes but that code only demonstrates one page. It doesn't have a second page that displays using the same URL but only when you click on the link to go to that page. To make it work with a second hidden page without changing the URL you'd need either JavaScript or the frames that I originally suggested. Just that code by itself doesn't allow you to display two different pages using one address it only allows you to jump around within the one page.

Actually, I don't want to setup different pages, because it would be quite hectic.
I'm intending to write a multi-page article on the TOP 20 PC GAMES OF 2011, I think now you may have got an idea. I don't want to setup 20 different pages, with each featuring one game. All I want is, to write descriptions on 20 different games inside an article and when the readers click on the next link, it should appear as if the next game appears like a totally different article (but with the same url). Something like pagebreaks..

felgall
02-02-2012, 08:30 AM
All I want is, to write descriptions on 20 different games inside an article and when the readers click on the next link, it should appear as if the next game appears like a totally different article (but with the same url). Something like pagebreaks..

If you have it as one HUGE download then most people will leave before it all downloads. Also the only way to hide and show parts of it then are using JavaScript so that those who don't have it will either be unable to see past 'page one' or will see the whole lot at once - assuming they wait for it to load.

Also with 20 topics in the one page the search engines will ignore the page because of it not being about one thing - so no one will find the page anyway.

jackuars
02-02-2012, 09:16 AM
If you have it as one HUGE download then most people will leave before it all downloads. Also the only way to hide and show parts of it then are using JavaScript so that those who don't have it will either be unable to see past 'page one' or will see the whole lot at once - assuming they wait for it to load.

Also with 20 topics in the one page the search engines will ignore the page because of it not being about one thing - so no one will find the page anyway.

The whole article is about 20 Best PC Games of 2011. It's not different topics...I'm just listing these games with short reviews. Doesn't everybody turn on javasciprt...

Excavator
02-02-2012, 03:25 PM
Page Anchor is a good choice and easy to set up. But on clicking the "next page" does it show the contents of the previous page upon unhiding the next page. I don't want that. I only want the contents of the 2nd page to appear.

Thank you for the helpful replies and sorry for late posting

On the example link I gave you, page anchors are what do the Preview, Markup and CSS links. The added transition effect is jQuery.

jackuars
02-02-2012, 04:37 PM
On the example link I gave you, page anchors are what do the Preview, Markup and CSS links. The added transition effect is jQuery.

The page you linked to, is in another language. I know the basics of page anchoring and some basic html, but am weak in javascript. Even if page anchors are added, does it actually hide the 2nd page from viewing? And even if it does, does the contents of both pages appear on the same page, when clicking the next button? That's not what I desire.

Excavator
02-02-2012, 05:14 PM
The page you linked to, is in another language. I know the basics of page anchoring and some basic html, but am weak in javascript. Even if page anchors are added, does it actually hide the 2nd page from viewing? And even if it does, does the contents of both pages appear on the same page, when clicking the next button? That's not what I desire.

Visualize one big page, 25,000 pixels high. The anchor is just moving the viewport to different areas of that page, the whole page is loaded but the only visible area is what the viewport is looking at.

The js is not needed. Anchors work with or without it and are totally separate, it's just a nice effect.
Anchors are very basic HTML, right up your alley.

jackuars
02-02-2012, 05:32 PM
Ah, I thought you were mentioning about advanced anchoring or something. I know that anchoring takes you to different points on a single page. But that doesn't actually hide the upper portion. When you scroll the mouse you can still see that right?

I'll give an example.....
This is how I want my article to look like

Best PC Games 2011 (http://pc.ign.com/articles/114/1141301p1.html)

See the link to next page ('See next game') at the bottom of the article? On clicking that it should go to the next page, but IGN has implemented different url's for every page. I just want my article to be exactly similar to that of the article I just linked into , but clicking 'next' should let me go to the next page (game) but that should be under the same url. I hope now you get it. :)

felgall
02-02-2012, 09:02 PM
Doesn't everybody turn on javasciprt...

No - up to 10% of people have it turned off for one of a number of reasons. These reasons include for example:

1. In a lot of cases JavaScript can make it impossible for blind people to navigate the page as the script switches their position in the page without telling them. They turn off JavaScript to make the page usable.

2. For security reasons - eg. the only way to plug many security holes in IE6 is to turn off activeX. With that off the browser constantly pops up alerts that activeX is disabled unless you also turn off Active Scripting which will turn off JavaScript.

3. Some people are so annoyed at all of the advertising that some sites force on them via JavaScript that they turn off JavaScript just to get rid of all the ads (since an ad blocker will only get rid of some of the ads).

4. Older mobile devices don't support JavaScript.

5. Text only browsers often don't support JavaScript.


Even where JavaScript is turned on the JavaScript attached to the browser can override that in the web page itself and so the scripts attached to the page cannot be relied on to work.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum