Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Donald DUCK : YOU ARE FIRED!!!
Posted

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>

Donald DUCK : YOU ARE FIRED!!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...