My jquery slider disappears after any ajax callback. I'm pulling out my hair trying to shoot this one...
I have a jquery slider on my page inside an asp panel. I'm rounding the panel corners with a RoundedCornersExtender. That rounded panel is inside an asp UpdatePanel.
Whenever any callback occurs, my slider disappears. It disappears from sight, and all the controls below the slider move up about 12 pixels (approximately the height of the slider). If I move the slider outside the UpdatePanel, it works as expected.
But I can't move the slider outside the UpdatePanel because it is in the flow with other controls that need to be ajax-ified.
I suppose I can have the slider logically outside the UpdatePanel yet place it with 'position:', but that seems like a poor design.
Can anyone help out this poor programmer who is relatively new to the UI portion of a web app?
Hi riteshtandon23, im facing the same problem and i think ur solution would work for me but i cant know what is "divprogress"?? i would appreciate ur help.. thanks in advance.
"divprogress" is the id of the div which holds your slider. How ever you can ignore it i have taken it just to check weather my div having id "divprogress" exists in the page or not.
bradwoody
Member
55 Points
55 Posts
My jquery slider disappears after any ajax callback
Jul 22, 2010 09:52 PM|LINK
My jquery slider disappears after any ajax callback. I'm pulling out my hair trying to shoot this one...
I have a jquery slider on my page inside an asp panel. I'm rounding the panel corners with a RoundedCornersExtender. That rounded panel is inside an asp UpdatePanel.
Whenever any callback occurs, my slider disappears. It disappears from sight, and all the controls below the slider move up about 12 pixels (approximately the height of the slider). If I move the slider outside the UpdatePanel, it works as expected.
But I can't move the slider outside the UpdatePanel because it is in the flow with other controls that need to be ajax-ified.
I suppose I can have the slider logically outside the UpdatePanel yet place it with 'position:', but that seems like a poor design.
Can anyone help out this poor programmer who is relatively new to the UI portion of a web app?
Thanks in advance,
Brad
jquery slider updatepanel
riteshtandon...
Member
273 Points
68 Posts
Re: My jquery slider disappears after any ajax callback
Jul 23, 2010 06:03 AM|LINK
Please try the following javascript code. Place the below code in your page.
function pageLoad(sender, args) {
if (document.getElementById('divProgress') != null)
{
//Your code here for slider
}
if (args.get_isPartialLoad())
{
//Your code again here for slider
}
}
Maniak7
Member
211 Points
111 Posts
Re: My jquery slider disappears after any ajax callback
Jul 23, 2010 09:34 AM|LINK
do you need to update anything inside update panel? if no, set UP mode to conditional
bradwoody
Member
55 Points
55 Posts
Re: My jquery slider disappears after any ajax callback
Jul 23, 2010 02:10 PM|LINK
Hi Maniak7,
I do update other controls in the UpdatePanel, but I tried your suggestion anyway.
Unfortunately, the slider still disappeared.
Thank you for your response, I really appreciate it...
Brad
bradwoody
Member
55 Points
55 Posts
Re: My jquery slider disappears after any ajax callback
Jul 23, 2010 02:17 PM|LINK
Hi riteshtandon23,
You are A STUD!!! Thank you, it worked.
One additional related question if I may.
I have the slider javascript in an external file. I modified my code per your suggestion - had no effect.
So I moved the modified code to the aspx file and it worked.
My question (OK, two questions):
1. why would that matter?
2. can you suggest a way to allow "our" javascript to live nicely in the external file so I can remove it from the aspx page?
Thanks again in advance,
Brad
Maniak7
Member
211 Points
111 Posts
Re: My jquery slider disappears after any ajax callback
Jul 23, 2010 05:32 PM|LINK
if the code is in external file it won't run on page load, but only if it's called.
but to minimise code you can have
function pageLoad(sender, args) {
//call function from external file
}
RKD
Member
4 Points
2 Posts
Re: My jquery slider disappears after any ajax callback
Dec 02, 2011 04:53 PM|LINK
Hi riteshtandon23, im facing the same problem and i think ur solution would work for me but i cant know what is "divprogress"?? i would appreciate ur help.. thanks in advance.
regards
riteshtandon...
Member
273 Points
68 Posts
Re: My jquery slider disappears after any ajax callback
Dec 07, 2011 09:05 AM|LINK
"divprogress" is the id of the div which holds your slider. How ever you can ignore it i have taken it just to check weather my div having id "divprogress" exists in the page or not.
Thnx
ritessh