I guess the confusing thing is that there really isn't any AJAX. I understand the event binding problem when new elements are added to the DOM. This page is set up in a way where the div containing the modalpopup is set to display:none, which I imagine SimpleModal toggles. There is no request--AJAX or otherwise--of any kind. That's why I'm a little perplexed the event isn't rebinding.
Maybe I can use one of the same techniques to work around the problem, however... Ron On Dec 10, 3:53 pm, "Brian Cherne" <[EMAIL PROTECTED]> wrote: > There's another thread from today that points to the > FAQ<http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st... > > > > Brian. > > On Wed, Dec 10, 2008 at 3:50 PM, Brian Cherne <[EMAIL PROTECTED]> wrote: > > Neither JavaScript's nor jQuery's click will automatically re-bind if the > > object is removed and then added again. If the link you refer to is replaced > > by a new set of content (with an identical link) you may consider using a > > plug-in like Brandon Aaron's Live Query: < > >http://brandonaaron.net/docs/livequery/> > > > I don't know if SimpleModal has an onLoad callback (or something similar), > > but if it does you could re-attach the click handlers then. I've had good > > luck/success with Brice Burgess' jqModal: > > <http://dev.iceburg.net/jquery/jqModal/> > > > Brian. > > > On Wed, Dec 10, 2008 at 3:28 PM, Ron <[EMAIL PROTECTED]> wrote: > > >> I'm wondering if the issue isn't JQuery's click event. Maybe the > >> problem is that JQuery's click handler doesn't rebind? I seem to > >> remember someone running across this issue before, where they just > >> used javascript's click handler instead of JQuery to resolve it...I'll > >> try that and repost. > > >> Ron > > >> On Dec 10, 1:41 pm, Eric Martin <[EMAIL PROTECTED]> wrote: > >> > I don't see anything that is immediately obvious... > > >> > Make sure you don't have duplicate id's. > > >> > On Dec 10, 12:05 pm, Ron <[EMAIL PROTECTED]> wrote: > > >> > > Hi, > > >> > > So I have the following code: > > >> > > <script type="text/javascript"> > >> > > $(document).ready(function() { > > >> $('#ctl00_ContentPlaceHolder1_btnRadioHelp').click(function > >> > > () { > > >> > > $('#ctl00_ContentPlaceHolder1_Panel3').modal(); > > >> > > }); > > >> > > }); > > >> > > As you can probably tell, the server side code is asp.net. There is > >> a > >> > > panel with display set to none and a button that I binding the click > >> > > event to. > > >> > > When I click that button, everything works beautifully. But it only > >> > > works once. What am I overlooking? What do I need to add to ensure > >> > > that the button fires again? > > >> > > Thanks, > > >> > > Ron