468,783 Members | 1,572 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,783 developers. It's quick & easy.

How can I make "clicking an image" launch a script?

1
I cannot find the answer anywhere on the entire net:

I have an image on my website. The image shows a newsletter, and the image says "Click here to register to receive our newsletter".

I know how to make the image link to a url, but I don't want to do that. What I want to do is when you click on the image, it calls an external javascript function that brings up a popup where you enter your name and email address and submit. The external function is handled by aweber, which is an email list manager company, and it's already created.

The external java looks like this:

<script type="text/javascript" src="http://forms.aweber.com/form/33/423434534.js"></script>

I can put this directly onto my main page in using html, but then it puts the popup directly on the page when the page loads. I don't want that to happen.

Instead, all I want for Christmas is for this javascript to load and execute when you click on the image on my website that says "Click here to register to receive our newsletter", which would then create a popup on my page where the user enters the name and email address.

Seems very simple to me, but I cannot find the answer anyway.
Thanks!
Oct 26 '09 #1
1 2594
Dormilich
8,651 Expert Mod 8TB
@jntmac
this article, example at the bottom.

@jntmac
you need to unregister the page load event handler.
Oct 26 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by al | last post: by
1 post views Thread by BKDotCom | last post: by
1 post views Thread by zelnugget | last post: by
1 post views Thread by mmcc128 | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.