Hi all,
OK, I have an image set up with CSS in a DIV tag.
I start the basic DIV as follows...
<DIV class="blueball"></DIV>
What I would like to do is detect if a user clicks this image and then launch a function in a script file.
Can it be done from within the DIV tag? Should I use SPAN?
The script file reloads the page with a new set of graphics - so image maps are really out of the question as I would have to store several maps.
Hope that makes sense!
Regards,
Neil.
Launching a JS from DIV tag on mouse...
Yes
Just remember to declare the function or reference the external js in the head section.
<div class="blueball" onclick="functionName('value')"</div>
Just remember to declare the function or reference the external js in the head section.
CoffeeCup... Yeah, they are the best!
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.