I'm trying to do a NOSCRIPT version of SwitchContent but I am having trouble with mixing JS and PHP code. Here's my PHP code:
When JS is turned off, I would like the content to be hidden and have a href link to a page around $h_party_name.Code:echo "<div id=\"".$party_id."-title\" class=\"header_yellowdark \" style=\"margin-top:4px; margin-bottom:4px\">".$h_party_name."</div>\n"; echo "<div id=\"".$party_id."\" class=\"switchgroup_parties\">\n"; include ("inc/resultparties_switchcontent.inc"); echo "\n</div>\n"; // texbox_white closing echo "</div>\n"; } ?> <script type="text/javascript"> var switchparty=new switchcontent("switchgroup_parties", "div") //Limit scanning of switch contents to just "div" elements switchparty.setStatus('<img src="images/expander_down.gif" hspace="4" alt="" width="10" height="10"> ', '<img src="images/expander.gif" hspace="4" alt="" width="10" height="10"> ') //switchparty.setColor('black', 'black') switchparty.setPersist(false) switchparty.collapsePrevious(true) //Only one content open at any given time switchparty.init() </script>
Can someone help me with this?
Thank you.



Reply With Quote

Bookmarks