Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Creating Automatic Table of Contents (of pages) to Embed in Website

  1. #1
    Junior Member
    Join Date
    Apr 2019
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Creating Automatic Table of Contents (of pages) to Embed in Website

    Hello –

    I am an author and a beginner coder, and I am creating my website to set up all of my books that I have written. Each book chapter is a new page on the site, and on each page, I need to code in a Table of Contents. I've found other Table of Contents codes before, but the problem is, I need all of the Table of Contents to be synced across all pages. As in, every time I add a new chapter, I want to be able to add the new chapter to the Table of Contents, and have the Tables across all the pages be updated. Otherwise, I'd have to go through all the previous chapters/pages and add the new chapter to all of the Table of Contents; very tedious work. Can anyone help me out with this?

    Thanks,

    Jane

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Creating Automatic Table of Contents (of pages) to Embed in Website

    How is this a java programming question or problem?
    Are you looking to write a program to generate html for your web pages?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Apr 2019
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating Automatic Table of Contents (of pages) to Embed in Website

    I am using a website program (Weebly) that allows for Java code to be embedded into the site. This program automatically creates web addresses for each new web page I make; the problem is coding a Table of Contents that will automatically sync to Tables across multiple web pages every time the Table is edited/updated. Here is an example of a Table of Contents code I tested out on my website, but does not automatically sync across multiple pages.

    <h1>Table of Contents</h1>

    <ol>

    <li><a name="top"></a><a href="#one">Contents Item One</a> </li>

    <li><a href="#two">Contents Item Two</a> </li>

    <ol>

    <li><a href="#twoa">Sub-content Item A</a> </li>

    <li><a href="#twob">Sub-contents Item B</a> </li>

    </ol>

    <li><a href="#three">Contents Item Three</a> </li>

    </ol>

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Creating Automatic Table of Contents (of pages) to Embed in Website

    Do you have any java programming questions?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Apr 2019
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Creating Automatic Table of Contents (of pages) to Embed in Website

    How do I create a Java code that contains a list of web pages that will sync across multiple web pages when a new web page is added to the list?

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Creating Automatic Table of Contents (of pages) to Embed in Website

    sync across multiple web pages
    What does "sync" mean?
    It could be done if a java program is able to read/write each of the web pages. It could read the list of pages from a file and use that data to write the needed html to the web pages. The web pages would need to have a special content that told the java program where to insert the html for the list.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 0
    Last Post: July 24th, 2013, 07:17 AM
  2. Creating a Linked List from the contents of a file
    By greystreet34 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 6th, 2013, 06:59 PM
  3. hibernate creating table without mapping file
    By Indrajeet in forum Web Frameworks
    Replies: 0
    Last Post: December 26th, 2012, 03:26 AM
  4. creating table model....
    By kollyisrealisaac in forum Java Theory & Questions
    Replies: 1
    Last Post: May 6th, 2011, 09:07 AM
  5. [SOLVED] Embed a Jar into a website/Exception handling
    By Hallowed in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 31st, 2011, 07:34 AM