A question on Ajax 1.0

microkarl

Regular
Joined
Apr 22, 2004
Messages
88
Location
Morristown, NJ
Hi, I have this web application and it has a 3rd party Gallery Control on the page . This gallery control would basically shows a list of images with a <A> tag wrapped it. And when i click on the image, it will be redirect to somewhere else...

Now, my question is, is there a way for Ajax1.0 to override or disable the <A> tag and injects a onClick event into these images? I know I can do this in jQuery, but since I am pretty new to Ajax1.0, so I really don't know what kind of limitation it has... for those who knows Ajax1.0 well, please help me!!

Thanks,
Carl
 
Okay, to demostrate how jQuery did this. the following is the javascript code that will do the trick. Basically I "hook up the alert box as well as disable the link when user click on any hyperlink tag". can someone tell me if there's a way to achieve the same thing in Ajax extension 1.0's client scripting library?

<script type="text/javascript">
$(document).ready(function()
{
$("a").click(function(){
alert("Thanks for visiting!");
return false;
});
});
</script>
 
Back
Top