View Full Version : Switch Content Script

12-09-2004, 02:21 PM
Script name: Switch Content Script
Link: Switch Content Script (http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm)
I have this script installed and working perfectly. Just was wondering if there is a way to have the link toggle either an image or a plus/minus sign depending on the state of the "<div>" tag. ie: if expanded a plus would show and if collapsed a minus would show. Thanks in advance for any help.

12-12-2004, 06:32 AM
I tried getting this inside the script mkboynton, but sadly I had no luck at all. I just don't know enough about JavaScript. The thread got burried and I never received help regarding it. Hope it goes better for you. I'm still keeping my eyes out for a way to do this, and I'll reply if I come across anything. Good luck!

12-12-2004, 10:26 PM
Thanks CrimsonDawn, I don't know very much about javascript either. I have also been searching for an answer.

12-15-2004, 12:25 PM
I'm possibily looking at upgrading the script for such a feature. No promises yet, but it's been noted. :)

12-18-2004, 04:54 AM
That's great news, ddadmin. Look forward to seeing if it happens! :D

12-22-2004, 12:13 AM
Ok, script updated for this feature: http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm :)

12-29-2004, 01:05 AM
I'm trying desperately to get this thing working. The click on link is working fine. the + changes to a minus and back to a + when clicked. my problem is the content absolutely does nothing ( it's always visible.

I've used exact cut and paste of your code for every part, this is pissing me off , it looks like such a cool script. :(

<table width="100%" cellpadding="1" cellspacing="0" align="center" border="0">
<tr><td colspan="2" align="center">
<div class="ArticleTitle"><?=$zonedesc?></div>
</td></tr><tr><td align="center">
NPC Count: <?=$npccount?> <a href="<?=$objectlink?>&DATA2=<?=$zone?>">View NPCs</a>
</td><td align="center">
Quest Count: <?=$questcount?> <a href="<?=$questlink?>&DATA2=<?=$zone?>">View Quests</a>
</td></tr><tr><td colspan="2" align="center">
<br /><br /><div onClick="expandcontent(this, 'feckyou')" style="cursor:hand; cursor:pointer"><span class="showstate"></span>Adjacent Zones:</div>
<div id="feckyou" class="switchcontent"><?=$zones?></div>

any ideas?

(Header file has the full exact unmodified javascript)