trums Posted July 20, 2010 Share Posted July 20, 2010 In this function I am attempting to grab the value of one of three radio buttons onclick. Then a lightbox is opened, inviting the user to add more information with a submit button. This works great until after you have gone through the process once. If you try to go through the process and 2nd time and click one of the radio buttons again, the submit button doesn't work! What can I do to make it work every time? The complete function is below: #rvspNoteSave is the submit button and I used the Boxy lightbox: http://onehackoranother.com/projects/jquery/boxy/ $("#rvspForm input:radio").click(function(){ var the_value = $(this).val(); new Boxy('<div style="margin:5px;">Leave an rsvp note<br/><textarea id="rvspNote"></textarea><br/><div class="span-4"></div><div class="span-4 last"><a href="#" id="noteClose">No, Thanks</a> <input type="button" id="rvspNoteSave" value="Save"/></div><hr class="space"/></div>', {title: "Add A Note", closeable: true, afterShow: function() { $("#rvspNoteSave").click(function(){ Boxy.get(this).hide(); }); }, afterHide: function() { $.ajax({ type: "POST", url: "http://localhost/events/ajax_savervsp/", data: "eventId="+eventId+"¬e="+$("#rvspNote").val()+"&rvsp="+the_value, beforeSend:function() { $("#yourrvsp").html("<center><img src='http://p3.localhost:81/static/images/loader.gif'></center>"); }, success: function(data) { $("#yourrvsp").html("<center><br/><b>Your RVSP:</b> "+data+"</center>").show(); }, error: function() { alert("Connection to server interrupted. Please try again."); $("#yourrvsp").html(""); } }); }}); }); Your help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
jonndoe45 Posted July 20, 2010 Share Posted July 20, 2010 You best bet is to get firefox installed, install firebug for it and run through what is happening in the debugger can you post the actual code for the submit button, is it done via an onclick or just standard button activation ? Quote Link to comment Share on other sites More sharing options...
trums Posted July 20, 2010 Author Share Posted July 20, 2010 The submit button is just a normal submit button activation. The #rvspNoteSave in the above code is the code that the submit button activates. All it does is close the lightbox. I use firefox, but I will install firebug and see what it gives me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.