彩盒(jQuery插件中)我的文本框的值回发后空 [英] ColorBox (jquery plug in) my textbox values are empty after postback
本文介绍了彩盒(jQuery插件中)我的文本框的值回发后空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在遇到麻烦时,使用从文本框中获取值彩盒 http://colorpowered.com/colorbox/
I'm having trouble getting the values from text box when using ColorBox http://colorpowered.com/colorbox/
我有打开一个彩盒模式dialog.In模态,我有一个asp.net文本框和一个按钮,当我按一下按钮,我发现了回传,但文本框的值总是空的形式。
I have a form that opens a ColorBox modal dialog.In the modal i have a asp.net textbox and a button when i click the button i'm getting the postback but the value of the textbox is always empty.
<script type="text/javascript">
$(document).ready(function () {
$(".example8").colorbox({ width: "50%", inline: true, href: "#inline_example1" });
});
</script>
...
<form id="form1" runat="server">
<a href="content/ohoopee1.jpg" rel="example8" title="abc">Click here</a></p> <a class='example8'
href="#">Inline HTML</a></p>
<!-- This contains the hidden content for inline calls -->
<div style='display: none'>
<div id='inline_example1' style='padding: 10px; background: #fff;'>
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton><asp:TextBox
ID="TextBox1" runat="server"></asp:TextBox>
</div>
</div>
</form>
任何帮助将AP preciated。
谢谢。
Any help will be appreciated. Thanks.
推荐答案
尝试添加以下code的方法调用:
Try adding the following code to the method call:
$("#colorbox").appendTo('form');
所以你的code将是这样的:
So your code will look like this:
<script type="text/javascript">
$(document).ready(function () {
$(".example8").colorbox({ width: "50%", inline: true, href: "#inline_example1" });
$("#colorbox").appendTo('form');
});
</script>
至少这为我工作!
希望这有助于!
At least that's what worked for me!
Hope this helps!
这篇关于彩盒(jQuery插件中)我的文本框的值回发后空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文