Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 01-02-2008, 05:35 PM
Treefarn Treefarn is offline
New Comer (less than 5 posts)
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SwitchContent with Unordered HTML lists <UL> ??

1) Script Title:
Switch Content Script

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...tchcontent.htm

3) Describe problem:

I have an application (that unfortunately is not in production, so I can't send the webpage) that is using SwitchContent to display answers to questions. Everything works fine, unless the answer has an Unordered list in it. If the answer contains <UL> and <LI> tags, the UL and LI portions of the answer do NOT contract. ANyone else have problems with UL???

The relevant code:

<A href="javascript:togglehideshow.sweepToggle('contract')">Contract All</A> | <A href="javascript:togglehideshow.sweepToggle('expand')">Expand All</A> </div>


<p class=switchgroup1 id=bobcontent<%=x%>><%=Answer%>

<SCRIPT type=text/javascript>
var togglehideshow=new switchcontent("switchgroup1", "p")
togglehideshow.setStatus('<img src="../images/site/Eopen.gif" /> ', '<img src="../images/site/bdot.gif" /> ')
togglehideshow.setColor('darkred', '#607DA7')
togglehideshow.setPersist(true)
togglehideshow.collapsePrevious(true)
togglehideshow.init()
</SCRIPT>
Reply With Quote
  #2  
Old 01-03-2008, 03:18 AM
ddadmin's Avatar
ddadmin ddadmin is offline
Administrator
 
Join Date: Aug 2004
Posts: 7,627
Thanks: 2
Thanked 639 Times in 629 Posts
Blog Entries: 13
Default

It shouldn't matter if the expanding content contains UL lists, as long as they are wrapped in the main content DIV. I just tested this out, and the below seems to work fine:

Code:
<h3 id="bobcontent2-title" class="handcursor">Difference betwen Java & JavaScript?</h3>
<div id="bobcontent2" class="switchgroup1">
Java is completely different from JavaScript.
The former is a compiled language while the later is a scripting language.
<ul>
<li>sdff</li>
<li>sdff</li>
<li>sdff</li>
<li>sdff</li>
</ul>
</div>
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:38 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.