Hi

The following is a very simple view that should display the answer to
question when the question is clicked. Otherwise the answer should not
display. ie. the question is a toogle key.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<title>Our Program - Preschool</title>
<?php echo $this->Html->script('faq.js'); ?>
</head>

<body>
<div id="content1">

<div id="questionDiv"><a href="javascript:toogle_answerDiv();">Are
admissions to Merry Flower's program open throughout the year? </a></
div>
<div id="answerDiv">Playgroup admissions are open for most part of the
year. Admissions to the programs of Nursery, JR KG &amp; SR KG though
close by 31st August in that given year.</div>
</div>


</body>
</html>

When I try to debug through mozilla's firebug, it is going into
toogle_answerDiv() but the answer is not displaying.

The following is faq.js
function toogle_answerDiv()
{       var a=document.getElementById('answerDiv');

        if (a.style.display=="block")
                a.style.display="none";
        else
                a.style.display=="block";
}

cake.generic.css
#questionDiv{
        margin:3%;
        color:#006666;
        font-weight:bold;
}
#answerDiv{
        display:none;
        color:#666666;
}
Does anyone know on what am I doing wrong?
Any help is much appreciated.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to