View Full Version : Very Simple Question about a JS link, but Im pulling my hair out!

07-18-2012, 06:49 PM
On the surface it looks simple, but here is my question.

I want to use this CSS button to replace the 'here' text in the bottom script:

Here is the button code itself:

<a href="#" class="read_more3">Full Specification Sheet</a>

And here is the script I want to happen when you click on the button. Right now this works, but only if click on the plain text 'here':

<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display ='block'">here</a>

Thanks in advance!!!

Old Pedant
07-18-2012, 09:32 PM
<a href = "#" class="read_more3"
onclick = "document.getElementById('light').style.display='block';
return false;">
Full Specification Sheet

The key is return false. Without that, the <a> tries to do its normal operation.

07-19-2012, 12:37 AM
Thank You Sir