dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: HTML Toggle Code - Please Help Me!!!

  1. #1
    Join Date
    Jun 2012
    Posts
    2

    Question HTML Toggle Code - Please Help Me!!!

    Hello - I apologize if this is a poor and long question but I am new to HTML and I am trying to write a simple web page for our Bible group. I really have exhausted trying to solve it myself. Here is what I would like the web page to look like...

    DAY 1 (toggle when clicking 'DAY 1') - when clicked it displays comments underneath. Click 'DAY 1' wording again and the comments are hidden.

    DAY 2 - same as for DAY 1 - toggle when clicking on the wording to display and hide comments specifically for DAY 2.

    etc...

    Below is a copy of the code I've come up with so far. I'm sure it's not very robust. I'm having trouble with DAY 2 and it's comments appearing outside of clicking DAY 1. Any help would be GREATLY appreciated.

    Thank you!
    Greg


    <STYLE TYPE="text/css">
    <!--
    BODY
    {
    color:black;
    background-color:white;
    font-family:verdana;
    }
    A:link{color:blue}
    A:visited{colorurple}
    -->
    </STYLE>

    <a href="#" onclick="toggle('JanDay1')"><b>DAY 1</b></a>
    <br>
    <script type="text/javascript">

    function toggle(id) {
    var e = document.getElementById(id);

    if (e.style.display == 'block')
    e.style.display = 'none';
    else
    e.style.display = 'block';
    }

    </script>
    <div id="JanDay1" style="display:none">
    <script type="text/javascript">

    function toggle2(id, link) {
    var e = document.getElementById(id);

    }

    </script>


    <div id="JanDay1">
    I am happy to welcome some new first timers to our Bible in a Year Tour. The routine is simple so just keep in mind our goal is to read the entire Bible in one year daily as a group to encourage a team spirit. My goal as the minister is to always keep prayer and Bible Reading as the central focus at First Church. I can’t go into detail with my comments because of the allotted time and space. They are short and “blurpy” to highlight main points. This is why the main points you need to highlight with a pen or yellow highlighter to refer back. This part is real fun and you’ll find that review and repetition is the best key to learning. HAVE FUN!!!!!!!<br>
    <br>
    <div style="margin-left: 1em;">
    <A HREF="http://www.biblegateway.com/passage/?search=Genesis%201:1-2:25&version=NLT" target="_blank"><b>Genesis 1:1-2:25</b></A>
    <br>
    This is so neat every time to see GOD created it. EVERYTHING began and begins with God. I hope you begin the best part of your day today with realizing God created your job, families and you.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Matthew%201:1-2:12&version=NLT" target="_blank"><b>Matthew 1:1-2:12</b></A>
    <br>
    This is Joseph’s lineage as Luke will give Mary’s. The reason all these names of genealogy are mentioned is to prove that Mary and Joseph were the legitimate parents of Jesus.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Psalm%201:1-8&version=NLT" target="_blank"><b>Psalm 1:1-8</b></A>
    <br>
    The best Psalm to start this study. If we study and meditate on God’s word all the time our lives will be very fruitful and blessed. See if your days and the end of this year will be “soul prosperous” when you start by meditating on God today.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Proverbs%201:1-6&version=NLT" target="_blank"><b>Proverbs 1:1-6</b></A>
    <br>
    This states the whole theme and reason for reading Proverbs. It is the most practical and easy to apply in the whole Old Testament. There will be days the reading may be more difficult than the other three readings, but you can always get a “nugget” to think on for that day.<br>
    </div>
    <br>
    Happy reading,<br>
    <br>
    <br>
    </div>


    <a href="#" onclick="toggle('JanDay2')"><b>DAY 2</b></a>
    <br>
    <script type="text/javascript">

    function toggle(id) {
    var e = document.getElementById(id);

    if (e.style.display == 'block')
    e.style.display = 'none';
    else
    e.style.display = 'block';
    }

    </script>
    <div id="JanDay2" style="display:none">
    <script type="text/javascript">

    function toggle2(id, link) {
    var e = document.getElementById(id);

    }

    </script>


    <div id="JanDay2">
    Hey guys,
    I am assuming everyone has a HBHB to study along with your reading because I refer to it as a “tour guide or MAP” as it makes interesting comments about things along the journey. This little book (we stock it at church bookroom) has some neat facts. We all know the shortest verse “Jesus wept” but what about longest verse, shortest and longest Psalm, or middle verse and book of the Bible? See and highlight page 30 in the HBHB. Pages 20 and 21 will explain why we are on this tour better than I can. Let’s see who can start this every day and not miss even if you don’t do the jeopardy at the end of 2012. These are easy and just intended to help you remember highpoints.<br>
    <br>
    <div style="margin-left: 1em;">
    <A HREF="http://www.biblegateway.com/passage/?search=Genesis%203:1-4:26&version=NLT" target="_blank"><b>Genesis 3:1-4:26</b></A>
    <br>
    This whole sin comes back to doubting God. Our first parents thought it was more fun sinning.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Matthew%202:13-3:6&version=NLT" target="_blank"><b>Matthew 2:13-3:6</b></A>
    <br>
    If full submersion into water why is John the Baptist using the Jordan River?<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Psalm%202:1-12&version=NLT" target="_blank"><b>Psalm 2:1-12</b></A>
    <br>
    This speaks of Christ being the king that can’t be overthrown. He laughs at all other kingdoms that come and go.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Proverbs%201:7-9&version=NLT" target="_blank"><b>Proverbs 1:7-9</b></A>
    <br>
    Wisdom will give you honor and make you respectable if you listen and submit to parent’s correction. Happy reading, Tim<br>
    </div>
    <br>
    Happy reading,<br>
    <br>
    <br>
    </div>

  2. #2
    Join Date
    Jun 2012
    Location
    lahore
    Posts
    11
    Now see plz its displaying showing fine.



    <STYLE TYPE="text/css">
    <!--
    BODY
    {
    color:black;
    background-color:white;
    font-family:verdana;
    }
    A:link{color:blue}
    A:visited{colorurple}
    -->
    </STYLE>

    <a href="#" onclick="toggle('JanDay1')"><b>DAY 1</b></a>
    <br>
    <script type="text/javascript">

    function toggle(id) {
    var e = document.getElementById(id);

    if (e.style.display == 'block')
    e.style.display = 'none';
    else
    e.style.display = 'block';
    }

    </script>
    <div id="JanDay1" style="display:none">
    <script type="text/javascript">

    function toggle2(id, link) {
    var e = document.getElementById(id);

    }

    </script>


    <div id="JanDay1">
    I am happy to welcome some new first timers to our Bible in a Year Tour. The routine is simple so just keep in mind our goal is to read the entire Bible in one year daily as a group to encourage a team spirit. My goal as the minister is to always keep prayer and Bible Reading as the central focus at First Church. I can’t go into detail with my comments because of the allotted time and space. They are short and “blurpy” to highlight main points. This is why the main points you need to highlight with a pen or yellow highlighter to refer back. This part is real fun and you’ll find that review and repetition is the best key to learning. HAVE FUN!!!!!!!<br>
    <br>
    <div style="margin-left: 1em;">
    <A HREF="http://www.biblegateway.com/passage/?search=Genesis%201:1-2:25&version=NLT" target="_blank"><b>Genesis 1:1-2:25</b></A>
    <br>
    This is so neat every time to see GOD created it. EVERYTHING began and begins with God. I hope you begin the best part of your day today with realizing God created your job, families and you.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Matthew%201:1-2:12&version=NLT" target="_blank"><b>Matthew 1:1-2:12</b></A>
    <br>
    This is Joseph’s lineage as Luke will give Mary’s. The reason all these names of genealogy are mentioned is to prove that Mary and Joseph were the legitimate parents of Jesus.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Psalm%201:1-8&version=NLT" target="_blank"><b>Psalm 1:1-8</b></A>
    <br>
    The best Psalm to start this study. If we study and meditate on God’s word all the time our lives will be very fruitful and blessed. See if your days and the end of this year will be “soul prosperous” when you start by meditating on God today.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Proverbs%201:1-6&version=NLT" target="_blank"><b>Proverbs 1:1-6</b></A>
    <br>
    This states the whole theme and reason for reading Proverbs. It is the most practical and easy to apply in the whole Old Testament. There will be days the reading may be more difficult than the other three readings, but you can always get a “nugget” to think on for that day.<br>
    </div>
    <br>
    Happy reading,<br>
    <br>
    <br>
    </div>

    </div>
    <a href="#" onclick="toggle('JanDay2')"><b>DAY 2</b></a>
    <br>
    <script type="text/javascript">

    function toggle(id) {
    var e = document.getElementById(id);

    if (e.style.display == 'block')
    e.style.display = 'none';
    else
    e.style.display = 'block';
    }

    </script>
    <div id="JanDay2" style="display:none">
    <script type="text/javascript">

    function toggle2(id, link) {
    var e = document.getElementById(id);

    }

    </script>


    <div id="JanDay2">
    Hey guys,
    I am assuming everyone has a HBHB to study along with your reading because I refer to it as a “tour guide or MAP” as it makes interesting comments about things along the journey. This little book (we stock it at church bookroom) has some neat facts. We all know the shortest verse “Jesus wept” but what about longest verse, shortest and longest Psalm, or middle verse and book of the Bible? See and highlight page 30 in the HBHB. Pages 20 and 21 will explain why we are on this tour better than I can. Let’s see who can start this every day and not miss even if you don’t do the jeopardy at the end of 2012. These are easy and just intended to help you remember highpoints.<br>
    <br>
    <div style="margin-left: 1em;">
    <A HREF="http://www.biblegateway.com/passage/?search=Genesis%203:1-4:26&version=NLT" target="_blank"><b>Genesis 3:1-4:26</b></A>
    <br>
    This whole sin comes back to doubting God. Our first parents thought it was more fun sinning.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Matthew%202:13-3:6&version=NLT" target="_blank"><b>Matthew 2:13-3:6</b></A>
    <br>
    If full submersion into water why is John the Baptist using the Jordan River?<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Psalm%202:1-12&version=NLT" target="_blank"><b>Psalm 2:1-12</b></A>
    <br>
    This speaks of Christ being the king that can’t be overthrown. He laughs at all other kingdoms that come and go.<br>
    <br>
    <A HREF="http://www.biblegateway.com/passage/?search=Proverbs%201:7-9&version=NLT" target="_blank"><b>Proverbs 1:7-9</b></A>
    <br>
    Wisdom will give you honor and make you respectable if you listen and submit to parent’s correction. Happy reading, Tim<br>
    </div>
    <br>
    Happy reading,<br>
    <br>
    <br>
    </div>
    </div>

  3. #3
    Join Date
    Jun 2012
    Location
    lahore
    Posts
    11
    if you want to change in toggle u need to be change script or you can you use spry tabbed panel. its very easy ...

  4. #4
    Join Date
    Jun 2012
    Posts
    2

    Smile Thank you!

    Thank you so much! I greatly appreciate it! I never would have figured it out on my own! Thank you...thank you...thank you!

  5. #5
    Join Date
    Jun 2012
    Location
    lahore
    Posts
    11
    U welcome..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles