PDA

View Full Version : ست کردن محل قرارگیری Loading در updatepanel



b.paseban
چهارشنبه 31 فروردین 1390, 15:54 عصر
سلام بر دوستان.
من از یکی از سورس های آماده سایت یه updateprogress پیدا کردم و اون رو توی پروژه قرار دادم اما محل قرار گیری اون updateprogress توی سایت رو میخوام روی updatepanel ست کنم اما نمیشه.
با این کد جاوا محل قرار گیری رو ست کرده اما من نمیدونم چطوری عوض کنم و محل قرار گیری اون رو خودم تنظیم کنم که کجا باشه.




<script type="text/javascript">

function onUpdating() {
// get the update progress div
var pnlPopup = $get('<%= this.pnlPopup.ClientID %>');

// get the gridview element
var gridView = $get('<%= this.Main.ClientID %>');

// make it visible
pnlPopup.style.display = '';

// get the bounds of both the gridview and the progress div
var gridViewBounds = Sys.UI.DomElement.getBounds(gridView);
var pnlPopupBounds = Sys.UI.DomElement.getBounds(pnlPopup);

// center of gridview
var x = gridViewBounds.x + Math.round(gridViewBounds.width / 2) - Math.round(pnlPopupBounds.width / 2);
var y = gridViewBounds.y + Math.round(gridViewBounds.height / 2) - Math.round(pnlPopupBounds.height / 2);

// set the progress element to this position
Sys.UI.DomElement.setLocation(pnlPopup, x, y);
}

function onUpdated() {
// get the update progress div
var pnlPopup = $get('<%= this.pnlPopup.ClientID %>');
// make it invisible
pnlPopup.style.display = 'none';
}
</script>


pnlPopup جایی هست که عکس و یا متن Loading ماقرار میگیره.(یه پنل که display: none هست و موقع اجرای لودینگ display اون از حالت none خارج میشه)
حالا من میخوام این loading وسط updatepanel ست بشه اما هر کاری میکنم نمیشه و وسط صفحه میره.
اگه چیزه دیگه ای هم بود که نگفتم بگین براتون توضیح بدم.
ممنون.

b.paseban
چهارشنبه 31 فروردین 1390, 19:27 عصر
کسی جواب مرا nemidahiad?