Use either .bind("click", function() { ... http://docs.jquery.com/Events/bind#typedatafn
or .click(function() { ... http://docs.jquery.com/Events/click#fn rather than setting the onclick attr - Richard Richard D. Worth http://rdworth.org/ On Thu, Apr 3, 2008 at 7:36 AM, Bruce MacKay <[EMAIL PROTECTED]> wrote: > Hello all, > > The following function forms the first part of a two step confirmation > sequence for deleting either a quiz or a slideshow. > > The onclick element is correctly produced for the second step of > confirmation. > > Unfortunately, whereas FF fires the onclick event, IE7 does nothing, zip. > > > function confirmDel(what,where,which,ht,pb){ > $("#"+where+"b").hide(); > $("#"+where).fadeIn(500).css("height",""+ht+""); > switch(what) { > case "sshow": > var sWhat = 1; > break; > case "quiz": > var sWhat = 2; > break; > } > $("#"+where).find('a').eq(0).attr('onclick', 'deleteItem(' + which + > ','+pb+',1,'+sWhat+');return false;'); > }; > > My googling has revealed that IE has a problem with dynamically produced > "onClicks", but that's about as far as my understanding goes. Is this > problem a total block and/or are there alternative approaches I should be > taking to pass the variables to the ajax call that does the final deletion? > > Thanks, > > Bruce >