I have a page that popups a jQuery modal with a server side textbox inside it. When I go to save the information in the textbox (server side), none of the text the user typed is there. Can someone help with this?
//image user clicks on image to call popup
<img id="imgComments" src="assets/images/edit_icon.gif" class="editIcon handCursor" style="display: none; padding-left: 20px;" alt="General comments" />
//div which houses the server side textbox the user types in.
<div id="divComments" title="General Program Comments" style="display: none;">
<asp:TextBox id="txtComments" TextMode="MultiLine" Rows="25" style="width: 100%;" runat="server" />
</div>
//jQuery to initialize and call the hidden div above
$("#divComments").dialog({
autoOpen: false,
show: "blind",
width: 500,
height: 480,
draggable: false,
position: 'center',
modal: true,
open: function (type, data) {
$(this).parent().appendTo("form");
}
});
$("#imgComments").click(function () {
$("#divComments").dialog("open");
return false;
});
wannabe67
Member
11 Points
23 Posts
jQuery not working with server side control
Nov 07, 2012 09:12 PM|LINK
I have a page that popups a jQuery modal with a server side textbox inside it. When I go to save the information in the textbox (server side), none of the text the user typed is there. Can someone help with this?
//image user clicks on image to call popup <img id="imgComments" src="assets/images/edit_icon.gif" class="editIcon handCursor" style="display: none; padding-left: 20px;" alt="General comments" /> //div which houses the server side textbox the user types in. <div id="divComments" title="General Program Comments" style="display: none;"> <asp:TextBox id="txtComments" TextMode="MultiLine" Rows="25" style="width: 100%;" runat="server" /> </div> //jQuery to initialize and call the hidden div above $("#divComments").dialog({ autoOpen: false, show: "blind", width: 500, height: 480, draggable: false, position: 'center', modal: true, open: function (type, data) { $(this).parent().appendTo("form"); } }); $("#imgComments").click(function () { $("#divComments").dialog("open"); return false; });JQuery
asteranup
All-Star
30184 Points
4906 Posts
Re: jQuery not working with server side control
Nov 08, 2012 04:52 AM|LINK
Hi,
You are facing this problem-
http://delicious.com/anupdg/dialog+click+button+postback
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
Shailendra S...
Member
551 Points
145 Posts
Re: jQuery not working with server side control
Nov 08, 2012 04:59 AM|LINK
http://www.daniweb.com/web-development/aspnet/threads/382928/jquery-is-not-work-on-asp.net-button-control
JQuery
www.techaray.com
anil.india
Contributor
2613 Points
453 Posts
Re: jQuery not working with server side control
Nov 08, 2012 06:44 AM|LINK
add your dialog div to fom as -
$(this).parent().appendTo($("form:first"));Or with formID
$(this).parent().appendTo( $("[id$=myFormId]") );codepattern.net/blog ||@AnilAwadh