No no, I already use Jquery for many things like: form validation, autocomplete, etc ... In this page I use only that and the only Javascript I have in my HTML markup is this one in this button ... this is why i am asking this.
Thanks, Miguel On Jul 11, 5:50 pm, noon <[EMAIL PROTECTED]> wrote: > Should you? Well if thats the only javascript on the page there isn't > much point in including a library for something like that. > > However you could do it by saying: > > // jQuery's document ready > $(function() { > // grab the button and assign event > $("#Cancel").click(function() { > window.location.href = "/some/url/here"; > }); > > }); > > On Jul 11, 12:39 pm, shapper <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I have a button which redirects to a page: > > <button class="Cancel" type="button" onclick="location.href='/Tag/ > > List?page=1'" id="Cancel">Cancel</button> > > > Should I remove the onclick from the button and do this with JQuery? > > > And how can I do that using JQuery? > > > Thanks, > > Miguel