I need to display the spinner image in asp.net vie java script i want to show image while binding Data i kept the spinner image in parent form but when i am going to access the image i getting the image but it will now shows
i am getting parent image like parent.document.getElementnyId('divId').style.visibility = 'visible';

Suraj SahooRank #382 · 6.6K reputationPosted Mar 10, 2015, 2:10 AM EDT
First of all adjust and add the image in the viewpage with display none and an id. The image should have styling so that it is visible in the center of the page or wherever you need the positioning.
Then wherever you need may it be an ajax call start just use the id and show like:
$("#spinID").show();
and in the success or wherever you need, hide it like:
$("#spinID").hide();
I hope this helps.
Accept if helps.
Post back queries if any
Thanks
chetan shinde107 reputationPosted Mar 10, 2015, 2:27 AM EDT
i done the code like :
parent.document.getElementnyId('divId').style.visibility = 'visible';
and when want to hide
parent.document.getElementnyId('divId').style.visibility = 'hidden';
is there any wrong in this code...?
Suraj SahooRank #382 · 6.6K reputationPosted Mar 10, 2015, 2:49 AM EDT
Directly you can add.
And you can minimize the code using the display property that would be handy. Like:
$("#divId").show();
and when want to hide
$("#divId").hide();
I am sure this will work.
As I have already implemented this way.
Accept if helps
Thanks.
Pradeep ShetRank #595 · 4K reputationPosted Mar 10, 2015, 2:51 AM EDT
Why are you using parent?
Is there any Iframe involved? If no then dont use parent. Directly use document.getElementnyId('divId').style.visibility = 'visible';
But have a habit of using Jquery syntax as shown by sooraj
$("#divId").show(); & $("#divId").hide();
chetan shinde107 reputationPosted Mar 10, 2015, 3:24 AM EDT
I am Doing the same thing now as u says. Shows the div like $("#divId").show(); and $("#divId").hide();
but still image is not showing while data is binding. I m binding data through json.
there is no iframe included. i remove the parent class.and accessing the img from local page. but still its not showing.
Suraj SahooRank #382 · 6.6K reputationPosted Mar 10, 2015, 5:05 PM EDT
This is as simple as it can be. Just take the id and display and hide.
Then use the $("#spinID").show(); and hide wherever required.
This should work. Use the code mentioned above.
Thanks
chetan shinde107 reputationPosted Mar 10, 2015, 9:24 PM EDT
If i dnt hide the image at last then image will shown me when all data will be binding completed.
but i want to show image in between of data bind. is there any other solu for the same. Then please help