Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript HTML email
Hi guys,
 
I wanna ask on how to create spoiler in email. I use mozilla thunderbird.
Here's the code i've tried :
<div id="spoiler" style="display:none"> 
Spoiler Content Here
</div> 
<button title="Click to show/hide content" type="button" onclick="if(document.getElementById('spoiler').style.display=='none') {document.getElementById('spoiler').style.display=''}else{document.getElementById('spoiler').style.display='none'}">Show/hide</button>
 
Well, the result : button is good, but when i clicked the button nothing happened.
Is there anything wrong with my code?
 
many thanks
-Y
Posted 28-Nov-12 16:27pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here: http://www.dug-portal.com/2009/10/einfacher-javascript-spoiler.html[^]
 
Is a simple code that would do the trick.
  Permalink  
Comments
satrio_budidharmawan at 2-Dec-12 22:39pm
   
well, i've tried it, but same result with my previous codes.
I suspected something wrong with Thunderbird since i've tried it with gmail and it worked.
TorstenH. at 3-Dec-12 5:37am
   
might be that Thunderbird does not use JS there. Or is it restricted to the internet settings on MS? Might be switched off there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100