So I tested out the page more carefully. I noticed when I do click "Help", it does seem to go to the server--implying some sort of partial postback. I substituted the asp control with just html and wired the code to the html. Now it works fine. So you were absolutely right--the problem is it is reloading the control and the JQuery is only binding the event to the original instance because it is called on a full page load.
Ron On Dec 11, 10:29 am, Ron <stecklyena...@gmail.com> wrote: > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml" > > <head id="ctl00_Head1"><title> > MeasureResults - Project Wizard > </title> > > <script src="../scripts/jquery-1.2.6.js" type="text/javascript"></ > script> > > <script src="../scripts/jquery.simplemodal-1.2.1.js" type="text/ > javascript"></script> > <script src="../scripts/jquery.listen.js" type="text/javascript"></ > script> > > <!--[if lt IE 7]> > <style type='text/css'> > #simplemodal-container a.modalCloseImg{ > background:none; > right:-14px; > width:22px; > height:26px; > filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( > src='img/x.png', sizingMethod='scale' > ); > } > </style> > <![endif]--> > <style> > #simplemodal-overlay { > background-color:#000; > cursor:wait; > > } > > #simplemodal-container { > height:200px; > width:300px; > background-color:#fff; > border:3px solid #ccc; > padding:5px; > > } > > #simplemodal-container a.modalCloseImg { > background:url(../Images/x.png) no-repeat; > width:25px; > height:29px; > display:inline; > z-index:3200; > position:absolute; > top:-14px; > right:-18px; > cursor:pointer;} > > </style> > <script src="../scripts/jquery.simplemodal-1.2.1.js" type="text/ > javascript"></script> > </head> > <body> > <form name="aspnetForm" method="post" action="w1.aspx" > id="aspnetForm"> > <div> > <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" / > > <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" > value="" /> > <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" > value="x2Rk4q0T0jpV > +BmIwwZTexFrKNQ25iord1seE8tKaIQkNZUyCc6Z6+DjPakueAspVCIvO1SlukgvvG/GE2n >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UzJG0sNygX3NGz7/XyYu2IZ+ne5z3iO/ > XzZW8tZ6d1NivDjsYYWkE/CSO5UDlmO5BUO4/ > K8Tv8nSDqAo1mi3Bq8F8+v4QJAVyBygbCeijA > +ugnrzVOh5LaNSwZZTuBhiWUK9iK6JQdvXuQT02zLHO3UIc5ttbTwH6ONierFNg61EMQHhK2iR6GxKc=" > / > > </div> > > <script type="text/javascript"> > //<![CDATA[ > var theForm = document.forms['aspnetForm']; > if (!theForm) { > theForm = document.aspnetForm;} > > function __doPostBack(eventTarget, eventArgument) { > if (!theForm.onsubmit || (theForm.onsubmit() != false)) { > theForm.__EVENTTARGET.value = eventTarget; > theForm.__EVENTARGUMENT.value = eventArgument; > theForm.submit(); > }} > > //]]> > > </script> > > <script src="/MR current 081209 1941/WebResource.axd? > d=meu79vySdAnb51EUvM6GFw2&t=633527533956801634" type="text/ > javascript"></script> > > <script src="/MR current 081209 1941/ScriptResource.axd? > d=y0GeT40FaIL8ffyshGA7_7vy25mw487n6FpyspUYFUL-hsgkzbALHQ4- > VcJdonq9fK8iEO-QuVeIKtQAZMejs6U41I4lU7z4RpDm7JnHa_A1&t=43c0ad72" > type="text/javascript"></script> > <script type="text/javascript"> > //<![CDATA[ > if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client- > side framework failed to load.'); > //]]> > </script> > > <script src="/MR current 081209 1941/ScriptResource.axd? > d=y0GeT40FaIL8ffyshGA7_7vy25mw487n6FpyspUYFUL-hsgkzbALHQ4- > VcJdonq9fViwMgjStz8myZOVCKPghvLaOg9zVaLnpnP2fGMB-3qDOkeLxNMAaoZmlWOPYP- > F0&t=43c0ad72" type="text/javascript"></script> > <div> > > <input type="hidden" name="__VIEWSTATEENCRYPTED" > id="__VIEWSTATEENCRYPTED" value="" /> > > <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" > value="wNtKHse7YLBOFV6aAF5obaAZALKw+aosdW48v4k16bXQGEaWGo/2re9EBCV > +2NsZcdk6KJmReam/ > 2qC3Pzu9odFj6TwCsnaGdbdiundhIrJ7pYeBSpNLdeVaDFK2npJi" /> > </div> > <div style="background-image:url('../Images/ > EEIBanner_Top_no_ss.PNG'); background-repeat:no-repeat"> > > <table border="0" cellpadding="0" cellspacing="0" > style="width: 100%; height: 100%"> > <tr> > > <td colspan="2" style="height: 73px; width:831px; text- > align:center"> > <span id="ctl00_lblTopHeader" > style="display:inline-block;font-size:Larger;width:487px;font-family: > Arial">Project Wizard</span></td> > <td> > > </td> > </tr> > > <tr> > <td style="width: 125px; text-align:center; vertical- > align:text-top; background-color:Transparent"> > <div id="ctl00_Panel1" style="width:125px;text- > align:left;"> > > <br /> > <table> > <tr> > <td style="width: 70px; text-align: > center;"> > > <a href="../UserPages/ > edituserprofile.aspx"><img src="../Images/Admin.jpg" border="0" alt=""/><br /> > > <span style="color:Black; font-size: > 10pt; font-family: Arial">Edit Profile</span></a></td> > </tr> > <tr> > <td colspan="2" style="height: 10px; "></ > td> > </tr> > <tr> > <td style="width: 70px; text-align:center; > height: 57px;"> > > <a href="../UserPages/ > securitynotes.aspx" target="_blank"><img src="../Images/lock.jpg" > border="0"/><br /> > <span style="color:Black; font-size: > 10pt; font-family: Arial">Security</span></a></td> > </tr> > <tr> > <td colspan="2" style="height: 10px; "></ > td> > </tr> > <tr> > <td style="width: 70px; text-align:center; > height: 57px;"> > <a href="../UserPages/tophelp.aspx" > target="_blank"><img src="../Images/QuestionMark.jpg" border="0"/><br / > > > > <span style="color:Black; font-size: > 10pt; font-family: Arial">Help</span></a></td> > </tr> > <tr> > <td colspan="2" style="height: 10px; "></ > td> > </tr> > <tr> > <td style="width: 70px; height: 22px; text- > align:center;"> > <a id="ctl00_LoginStatus1" > href="javascript:__doPostBack('ctl00$LoginStatus1$ctl02','')" > style="display:inline-block;border-style:None;">Login</a><br /> > > <a id="ctl00_LoginStatus2" > href="javascript:__doPostBack('ctl00$LoginStatus2$ctl02','')" > style="display:inline-block;color:Black;border-style:None;font- > family:Arial;font-size:10pt;">Login</a> > </td> > </tr> > <tr> > <td colspan="2" style="height: 10px; "></ > td> > </tr> > <tr> > <td style="width: 70px; height: 21px"> > > </td> > </tr> > </table> > > </div> > </td> > <td style="width:auto; text-align:left; vertical- > align:text-top"> > <div id="ctl00_Panel2" style="text-align:left;"> > > <link href="../modal.css" rel="stylesheet" type="text/css" /> > > <script type="text/javascript"> > $(document).ready(function() { > $('#ctl00_ContentPlaceHolder1_btnRadioHelp').click(function > () { > > $('#ctl00_ContentPlaceHolder1_Panel3').modal(); > > $(this).unbind('click').click(function() { > $('#ctl00_ContentPlaceHolder1_Panel3').modal(); > }); > }); > > }); > > </script> > <script type="text/javascript"> > //<![CDATA[ > Sys.WebForms.PageRequestManager._initialize > ('ctl00$ContentPlaceHolder1$ScriptManager1', document.getElementById > ('aspnetForm')); > Sys.WebForms.PageRequestManager.getInstance()._updateControls > (['tctl00$ContentPlaceHolder1$updatepaneltop','tctl00$ContentPlaceHolder1$updatepanelcontrols'], > [], [], 90); > //]]> > </script> > > <div id="ctl00_ContentPlaceHolder1_updatepaneltop"> > > <div> > <table cellspacing="0" cellpadding="4" border="0" > id="ctl00_ContentPlaceHolder1_GridView1" style="color:#333333;font- > size:Small;width:564px;border-collapse:collapse;font-family: Arial"> > <tr > style="color:White;background-color:#006699;font- > weight:bold;"> > <th scope="col">Question</th><th > scope="col">Response</th><th > scope="col">Edit</th> > > </tr><tr > style="color:#333333;background-color:#F7F6F3;"> > <td>What is the name of the > study</td><td>Excelsior</ > td><td><input type="button" value="Edit" > onclick="javascript:__doPostBack > ('ctl00$ContentPlaceHolder1$GridView1','Edit$0')" /></td> > </tr><tr > style="color:#284775;background-color:White;"> > <td>What is the level of > assignment?</td><td>Teacher</ > td><td><input type="button" value="Edit" > onclick="javascript:__doPostBack > ('ctl00$ContentPlaceHolder1$GridView1','Edit$1')" /></td> > </tr><tr > style="color:#333333;background-color:#F7F6F3;"> > <td>How many teachers are there that > will be using the > intervention?</td><td>3 to 9</td><td><input type="button" value="Edit" > onclick="javascript:__doPostBack > ('ctl00$ContentPlaceHolder1$GridView1','Edit$2')" /></td> > > </tr><tr > style="color:#284775;background-color:White;"> > <td>Is student-level data > available?</td><td>Yes</td><td><input > type="button" value="Edit" onclick="javascript:__doPostBack > ('ctl00$ContentPlaceHolder1$GridView1','Edit$3')" /></td> > </tr> > </table> > </div> > > </div> > > <table style="text-align: right" > > <tr > > > <td align="left" style="width: 337px" > > > </td> > <td style="width: 206px; height: 26px" align="left" > > > </td> > <td style="width: 30px; height: 26px" align="left" > > > </td> > > </tr> > > </table> > > <div id="ctl00_ContentPlaceHolder1_updatepanelcontrols"> > > <span id="ctl00_ContentPlaceHolder1_lblRadioText" > style="display:inline-block;width:552px;font-size: 14pt; font-family: > Arial">What is the level of assignment?</span> > > <table id="ctl00_ContentPlaceHolder1_rdoRadiolist" > border="0"> > <tr> > <td><input > id="ctl00_ContentPlaceHolder1_rdoRadiolist_0" > type="radio" name="ctl00$ContentPlaceHolder1$rdoRadiolist" > value="District" /><label > for="ctl00_ContentPlaceHolder1_rdoRadiolist_0">District</label></td> > </tr><tr> > <td><input > id="ctl00_ContentPlaceHolder1_rdoRadiolist_1" > type="radio" name="ctl00$ContentPlaceHolder1$rdoRadiolist" > value="School" /><label > for="ctl00_ContentPlaceHolder1_rdoRadiolist_1">School</label></td> > > </tr><tr> > <td><input > id="ctl00_ContentPlaceHolder1_rdoRadiolist_2" > type="radio" name="ctl00$ContentPlaceHolder1$rdoRadiolist" > value="Teacher" /><label > for="ctl00_ContentPlaceHolder1_rdoRadiolist_2">Teacher</label></td> > </tr><tr> > <td><input > id="ctl00_ContentPlaceHolder1_rdoRadiolist_3" > type="radio" name="ctl00$ContentPlaceHolder1$rdoRadiolist" > value="Grades" /><label > for="ctl00_ContentPlaceHolder1_rdoRadiolist_3">Grades</label></td> > </tr> > </table> > <input type="submit" > name="ctl00$ContentPlaceHolder1$btnRadioHelp" value="Help" > id="ctl00_ContentPlaceHolder1_btnRadioHelp" /> > > <input type="submit" > name="ctl00$ContentPlaceHolder1$btnNext" value="Next" > id="ctl00_ContentPlaceHolder1_btnNext" /> > > <div id="ctl00_ContentPlaceHolder1_Panel3" style="height: > 300px;width:200px;display: none;"> > > <span > id="ctl00_ContentPlaceHolder1_lblhelp">Selecting the level of > comparsion helps us structure the study for you.</span> > > </div> > > </div> > > </div> > </td> > </tr> > > <tr> > <td colspan="2" style="height: 82px; width:831px;"> > <span style="font-size: 8pt; font-family: > Arial"> > Copyright © 2007 by Empirical Education Inc. All rights reserved. > <br /> > <br /> > </span> > > </td> > </tr> > </table> > > </div> > > <script type="text/javascript"> > //<![CDATA[ > Sys.Application.initialize(); > //]]> > </script> > </form> > </body> > </html> > > On Dec 10, 7:19 pm, Eric Martin <emarti...@gmail.com> wrote:> If the element > that you bind the click event to is not changing in any > > way, there is no reason that the event shouldn't fire again. > > > Can you post (pastie.org or here) the structure of your page? > > > On Dec 10, 5:32 pm, Ron <stecklyena...@gmail.com> wrote: > > > > 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" <br...@cherne.net> 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 <br...@cherne.net> 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 <stecklyena...@gmail.com> 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 <emarti...@gmail.com> 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 <stecklyena...@gmail.com> 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