PDA

View Full Version : Little Poject..



hadouken!
21-06-2007, 11:22 PM
for you guys :P

i just need the spoiler thing in html or CSS IF thats possible. i want it for my myspace! +rep to ANYone who helps xx

LIKE THIS BUT HTML. BB Doesnt work.

Moved by opensourcehost (Forum Moderator) from Web Designing: Please post in the correct forum next time, thanks :).

the wombats
21-06-2007, 11:25 PM
<div width="100%" class="alt1" onclick="spoiler(this);" style="border-collapse: collapse; border: solid thin black;"><div id="idTitle" class="alt2" style="border-collapse: collapse; border: solid thin black; width: 100%;">&nbsp;<b>click to show</b></div><div id="idSpoiler" style="display: none;">{param}</div></div>


{param} should be replaced with what you want in the spoiler i think. that is the HTML code for a spoiler tag which hxf use.

hadouken!
21-06-2007, 11:28 PM
tried. but didnt seem to like it, got that error thing. and myspace blocked it i think :(

the wombats
21-06-2007, 11:35 PM
i just tried editing my profile, it came up with an error.

hadouken!
21-06-2007, 11:38 PM
yeah same in Dw too, i might just do a text box if nobody comes up with gd thingssss

Mentor
22-06-2007, 01:04 AM
It is really the kinda thing js is made for, although i suppose a conditional bit of css probably could do it, cross browser support would be terrible "/

Flisker
22-06-2007, 10:09 AM
add this to the myspace for the spoiler:


<script language='JavaScript' type='text/javascript'>
<!--
function spoiler(obj)
{
for (var i = 0; i < obj.childNodes.length; i++)
{
if (obj.childNodes[i].id == 'idTitle')
titleRow = obj.childNodes[i];
if (obj.childNodes[i].id == 'idSpoiler')
{
if (obj.childNodes[i].style.display != 'none')
{
obj.childNodes[i].style.display = 'none';
titleRow.innerHTML = '&nbsp;<b>Click to show spoiler</b>';
}
else
{
obj.childNodes[i].style.display = 'block';
titleRow.innerHTML = '&nbsp;<b>Click to hide spoiler</b>';
}
}
}
}
//-->
</script>
And heres the spoiler



<div width="100%" class="alt1" onclick="spoiler(this);" style="border-collapse: collapse; border: solid thin black;"><div id="idTitle" class="alt2" style="border-collapse: collapse; border: solid thin black; width: 100%;">&nbsp;<b>Click to show spoiler</b></div><div id="idSpoiler" style="display: none;">LIKE THIS BUT HTML. BB Doesnt work.</div></div></div>

Edit: I have just seen Javascript isnt allowed on myspace x_x

hadouken!
22-06-2007, 04:51 PM
so it wont work?

Ini
22-06-2007, 04:56 PM
No.....

Edited by opensourcehost (Forum Moderator): Please don't post pointlessly.

hadouken!
22-06-2007, 05:00 PM
i worked it out for myself. why post pointlessly?

Edited by opensourcehost (Forum Moderator): Please do not tell users that they have broken the forum rules, instead report the post using the report post button.

Ini
22-06-2007, 05:15 PM
It wasn't pointlessly i answered the question to your post..

Want to hide these adverts? Register an account for free!