We help IT Professionals succeed at work.
Get Started

Popup on onClick

Last Modified: 2012-06-22
The attached code runs a pop up if a cookie doesn't exist in your cache, I want to change it for the pop up to only show if you click on this link: <a id="followrss" href="#" target=""><img src="http://www.leadershipdynamics.org/follow.png" width="37" height="152"></a>

How would I go about doing this?
<script type="text/javascript">
function getCookie(nombre)
	start=document.cookie.indexOf(nombre + "=");
	if (start!=-1)
	start=start + nombre.length+1; 
	if (end==-1)
	return unescape(document.cookie.substring(start,end));
	return "";

  window.addEvent('domready', function(){
	SexyLightbox = new SexyLightBox({imagesdir: '<?=$site_url?>/wp-content/plugins/wp-emailfeedburnerpop/sexyimages/'});
	if (getCookie('popup') !="yes"){
	SexyLightbox.show('', '<?=$site_url?>/wp-content/plugins/wp-emailfeedburnerpop/form.html?height=150&width=400', 'sexylightbox');
	document.cookie = "popup=yes";

Open in new window

Watch Question
.Net Full Stack Developer
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE