954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Javascript light box problem?

When a member signs up there asked to enter an email and verify. When they click the verification link in there email there taken to step 2 which is where they enter there info. In the info page I have an privacy policy link, which displays this way.

<h3><span class="underLine">
	<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"><?php echo $this->lang->line('Privacy_Policy');?></a></span><?php echo $this->lang->line(')');?></h3>


Here in lies my problem...

When this link is clicked all it displays is a blank box with nothing in it. I suck at javascript, and im not very resourceful with finding answers for my problems.

How do you display content in the box. I cant seem to figure it out for some reason.

My site was built with codeigniter frame work.

JayGeePee
Light Poster
47 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
 

You can call a function to display the div.

<body>
<a href = "javascript:void(0)" onclick = "showPolicy()">Click here.</a>

<div id="light" style="display:none;">
<!-- Add your content here. -->
  This is the content/policy.
</div>
</body>
<script type="text/javascript">
function showPolicy()
{
  document.getElementById('light').style.display = 'block';
}
</script>
@developer
Junior Poster in Training
70 posts since Nov 2010
Reputation Points: 13
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: