PDA

View Full Version : spoiler bb code: text instead of button


Taragon
11-29-2007, 09:50 AM
Really hope someone could assist me with this.

Currently I'm using this as my 'spoiler' bb code:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Spoiler: <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
</div>
<div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;">
<div style="display: none;">
{param}
</div>
</div>
</div>

Would it be possible to change the button to a text link somehow?

--------------- Added 1196362617 at 1196362617 ---------------

Using a new script
<div class="fieldset">
<table class="tborder" cellpadding="5" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="3"><a style="float:left" href="#top" onclick="return toggle_collapse('spoiler_{option}')"><input type="hidden" value="{option}" />Spoiler</a><br></a></td>
</tr>
<tbody id="collapseobj_spoiler_{option}" style="display:none;">
<td class="alt1" align="$stylevar[left]" valign="top">{param}</td>
</tbody>
</table>
</div>
I was able to get this (textlink)

http://files.taragon.nl/2007/11/nav.jpg
But what I do like to have would be something this

http://files.taragon.nl/2007/11/text.jpg