Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Smile Multi-page article with same url

    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.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    jackuars (02-02-2012)

  • #3
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    You could incorporate some ajax to dynamically display different content at any given time. Several different options at dynamicdrive.com

    No page change or page refresh.
    Teed

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by teedoff View Post
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by felgall View Post
    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.
    Teed

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,742
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #7
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by Excavator View Post
    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.
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,742
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Quote Originally Posted by felgall View Post
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    jackuars (02-02-2012)

  • #9
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by Excavator View Post
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #10
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    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.
    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

  • #11
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    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..
    Last edited by jackuars; 02-02-2012 at 08:14 AM.

  • #12
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by jackuars View Post
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #13
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    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...

  • #14
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,742
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Quote Originally Posted by jackuars View Post
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    jackuars (02-02-2012)

  • #15
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    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.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •