javascript get and expand

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnnB
    New Member
    • Sep 2006
    • 3

    javascript get and expand

    I would like to add to an existing FAQ page on our company website. All I want to do is to have clickable questions (answers hidden). Click the question and the answer appears! Does anyone have a code for this?
  • JohannC
    New Member
    • Sep 2006
    • 15

    #2
    Originally posted by AnnB
    I would like to add to an existing FAQ page on our company website. All I want to do is to have clickable questions (answers hidden). Click the question and the answer appears! Does anyone have a code for this?

    Use <a>Anchors</a> onclick event you can show the answer by toggling visibility on a div tag. Easy Peasy

    Comment

    • AnnB
      New Member
      • Sep 2006
      • 3

      #3
      Originally posted by JohannC
      Use <a>Anchors</a> onclick event you can show the answer by toggling visibility on a div tag. Easy Peasy
      thank you so much! Could you give me an example because I don't know about toggling visibility stuff.

      Comment

      • JohannC
        New Member
        • Sep 2006
        • 15

        #4
        Originally posted by AnnB
        thank you so much! Could you give me an example because I don't know about toggling visibility stuff.
        ok , you shoud call a method on the onclick event then do a
        document.getEle mentByID('TheTh ingYouWantToTog gle').style.vis ibility=visible ; or document.getEle mentByID('TheTh ingYouWantToTog gle').style.vis ibility=hidden;

        I Think you should start with checking to see if you can get a method hooked up to the link.

        Comment

        • AnnB
          New Member
          • Sep 2006
          • 3

          #5
          Thanks Joanna. i will try this - Ann

          Comment

          Working...