Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 12, 2012 08:07 PM by ramll
Participant
1126 Points
1299 Posts
Dec 11, 2012 09:45 PM|LINK
Hello,
I am having a dialog which I am using for multiple things to show. Lets say some times Images and some times data.
When Dialog is loading, it is showing the last selected data first and then the selected data.
How can I clear that last data ? My Code is.
$('#btnSelDiff').click(function () { var type = "Difference"; var iSrc = "Theme.aspx?type=" + type; window.parent.$("#expFrm").attr("src", iSrc); $("#dialog").dialog("option", "title", 'Please Select Difference'); window.parent.$("#dialog").dialog("open"); return false; });
TIA
Dec 12, 2012 02:51 AM|LINK
Can anyone help me.?
All-Star
36644 Points
5432 Posts
Dec 12, 2012 03:38 AM|LINK
you can hide the frame until its loaded.
normally i'd have div with a loading image before the iframe. on dialog open, show the loading div and hide the iframe. on iframe load, hide the load and show the iframe.
30184 Points
4906 Posts
Dec 12, 2012 04:17 AM|LINK
Hi,
You can also use beforeClose event of the dialog and do necessary cleanup. Also can you try with a random querystring in the iframe source.
Dec 12, 2012 02:14 PM|LINK
asteranup You can also use beforeClose event of the dialog and do necessary cleanup. Also can you try with a random querystring in the iframe source.
Can you give some sample code on this ?
Thanks
Dec 12, 2012 08:07 PM|LINK
function clear() { $("#eiframe").prop('src', ""); }
ramll
Participant
1126 Points
1299 Posts
Clear Dialog Content Before Loading
Dec 11, 2012 09:45 PM|LINK
Hello,
I am having a dialog which I am using for multiple things to show. Lets say some times Images and some times data.
When Dialog is loading, it is showing the last selected data first and then the selected data.
How can I clear that last data ? My Code is.
$('#btnSelDiff').click(function ()
{
var type = "Difference";
var iSrc = "Theme.aspx?type=" + type;
window.parent.$("#expFrm").attr("src", iSrc);
$("#dialog").dialog("option", "title", 'Please Select Difference');
window.parent.$("#dialog").dialog("open");
return false;
});
TIA
ramll
Participant
1126 Points
1299 Posts
Re: Clear Dialog Content Before Loading
Dec 12, 2012 02:51 AM|LINK
Can anyone help me.?
bruce (sqlwo...
All-Star
36644 Points
5432 Posts
Re: Clear Dialog Content Before Loading
Dec 12, 2012 03:38 AM|LINK
you can hide the frame until its loaded.
normally i'd have div with a loading image before the iframe. on dialog open, show the loading div and hide the iframe. on iframe load, hide the load and show the iframe.
asteranup
All-Star
30184 Points
4906 Posts
Re: Clear Dialog Content Before Loading
Dec 12, 2012 04:17 AM|LINK
Hi,
You can also use beforeClose event of the dialog and do necessary cleanup. Also can you try with a random querystring in the iframe source.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
ramll
Participant
1126 Points
1299 Posts
Re: Clear Dialog Content Before Loading
Dec 12, 2012 02:14 PM|LINK
Hi,
Can you give some sample code on this ?
Thanks
ramll
Participant
1126 Points
1299 Posts
Re: Clear Dialog Content Before Loading
Dec 12, 2012 08:07 PM|LINK
function clear()
{
$("#eiframe").prop('src', "");
}