View Full Version : نمایش popup با کلیک روی hyperlinkfieldیک گریدویو
Leyla2011
سه شنبه 16 خرداد 1391, 06:55 صبح
دوستان کسی میدونه
چطور میشه یه فرم popup را از طریق کلیک روی hyperlinkfield گریدویو باز کرد؟؟
naserbarati
سه شنبه 16 خرداد 1391, 14:41 عصر
<script type="text/javascript">
$(document).ready(function () {
$('a#popup').live('click', function (e) {
var page = $(this).attr("href")
var $dialog = $('<div></div>')
.html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
.dialog({
autoOpen: false,
modal: true,
height: 500,
width: 550,
title: "حساب کاربر",
buttons: {
"بستن": function () { $dialog.dialog('close'); }
},
close: function (event, ui) {
__doPostBack('<%= btnRefresh.ClientID %>', '');
}
});
$dialog.dialog('open');
e.preventDefault();
});
});
</script>
<asp:TemplateField HeaderText="صورت حساب">
<ItemTemplate>
<center>
<a id="popup" href='bill.aspx?id=<%# Eval("id") %>' >
<img src="../images/account.png" width="20px" /></a>
</center>
</ItemTemplate>
</asp:TemplateField>
نتونستین 6 به بعد تماس بگیرید
nabarati@yahho.com من الاین هستم
Leyla2011
سه شنبه 16 خرداد 1391, 19:07 عصر
دوست گرامی بیشتر توضیح بدین لطفا
<script type="text/javascript">
$(document).ready(function () {
$('a#popup').live('click', function (e) {
var page = $(this).attr("href")
var $dialog = $('<div></div>')
.html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
.dialog({
autoOpen: false,
modal: true,
height: 500,
width: 550,
title: "حساب کاربر",
buttons: {
"بستن": function () { $dialog.dialog('close'); }
},
close: function (event, ui) {
__doPostBack('<%= btnRefresh.ClientID %>', '');
}
});
$dialog.dialog('open');
e.preventDefault();
});
});
</script>
<asp:TemplateField HeaderText="صورت حساب">
<ItemTemplate>
<center>
<a id="popup" href='bill.aspx?id=<%# Eval("id") %>' >
<img src="../images/account.png" width="20px" /></a>
</center>
</ItemTemplate>
</asp:TemplateField>
نتونستین 6 به بعد تماس بگیرید
nabarati@yahho.com من الاین هستم
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.