Raubie
08-12-2010, 01:36 AM
I could really use someone's help with what is probably a simple code fix.
Here's the spoiler code I'm using on a blogger.com page that uses a button to reveal an image and text. Being a one-time only use, I'd like to replace the "Click Here" button with an image (say, of a ticket) that once clicked, reveals the hidden image/text below. Since this is currently working via the button, what in the following code needs to be changed to replace the activation button with an image URL instead (assuming that all code in div class="spoiler" doesn't need to be changed, just the "pre-spoiler code). I like the working code below as it doesn't require any css/javascript.
<div class="pre-spoiler">
<input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Click Here'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Click Here';}" style="font-size: 10px; margin: 0px; padding: 0px; width: 140px;" type="button" value="Click Here" /></div>
<div>
<div class="spoiler" style="display: none;">
<a href="IMAGEURL" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" onclick="window.open('IMAGEURL','_blank','toolbar=0, location=0, top=5, left=50, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=x, height=y');return(false)"><img alt="" border="0" id="name" src="IMAGEURL_SMALL" width="400" /></a>text</div></div>
Your help would be really appreciated. Thank you. ~ Raubie
Here's the spoiler code I'm using on a blogger.com page that uses a button to reveal an image and text. Being a one-time only use, I'd like to replace the "Click Here" button with an image (say, of a ticket) that once clicked, reveals the hidden image/text below. Since this is currently working via the button, what in the following code needs to be changed to replace the activation button with an image URL instead (assuming that all code in div class="spoiler" doesn't need to be changed, just the "pre-spoiler code). I like the working code below as it doesn't require any css/javascript.
<div class="pre-spoiler">
<input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Click Here'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Click Here';}" style="font-size: 10px; margin: 0px; padding: 0px; width: 140px;" type="button" value="Click Here" /></div>
<div>
<div class="spoiler" style="display: none;">
<a href="IMAGEURL" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" onclick="window.open('IMAGEURL','_blank','toolbar=0, location=0, top=5, left=50, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=x, height=y');return(false)"><img alt="" border="0" id="name" src="IMAGEURL_SMALL" width="400" /></a>text</div></div>
Your help would be really appreciated. Thank you. ~ Raubie