Jquery tools overlay , i can not close page with javascript - jquery-tools

I use this code ... http://jquerytools.org/demos/overlay/external.html
But I can not close page with ajax code. When I click "X" image page is closed, but I want to make this action with javascript.
I try to close page external-content.htm in external-content.htm.
$(".contentWrap").hide("slow") code is close page content,
but it not close all page .

Related

Block UI: how to show the blocking image after page load

I am using BlockUI for my web app. On my page, I have
$(document).ready(function(){
$(document).ajaxStart($.blockUI).ajaxStop($.unblockUI);
});
The page uses Ajax to get data at page load, and I am able to see the spinning image as Ajax indicator.
After the page load, I have buttons and clicking on them invokes Ajax calls to get data and update part of the page. However, in these operations, I am not able to see the spinning image that I can see at page load.
How can I show blocking image/indicator after page load? Anything I did is wrong?
I suggest this code ;
$(document).ready(function() {
$('#yourDivName').delay(4000).hide();
});
After the 4 second your div is hiding with this way.
Atakan.

loading different pages in Iframe on button click, button is in main page

I have a back and next buttons and Iframe in main page.
On pressing next button next pages (which are forms to take input) are displayed in Iframe from server side.
I want to save data of current page in DB and then load 2nd page in Iframe. On clicking again save data of Page2 in DB and then load 3rd page in Iframe.
Similarly if user clicks back button he should get data of previous page.
Please suggest me how it can be achieved.
Thanks
To chane iframe src just use JS
function changeFrm(NewSrc){
document.getElementById('YOUR IFRAME ID').src=NewSrc;
};
And in your button add onClick="ChangeFrm('NEW SOURCE');"
Good luck!

Asp.net prevent modal popup to get displayed while clicking on browser back button

GoodEvening Everyone,
I am having one asp.net application which contains many links. some of the link displays modal popup Now if i move to link which nabvigates me and click on browser back button so modal popup gets display which i dont want. i need the previous page should get displayed instead of modal popup if i click on browser back button
for example
i clicked on link1 - navigated to page2
i clicked on link2 - displayed modal popup
i click on link3 - navigated to page3
Now if i click on browser back button so modal popup get displays instead of which i want the page2(previous page before the modal popup ) should get displayed.
So please let me know is this possible and how its possible.
It will be appreciated if some one provide me code to do this...
Let me know in case of more information required
There are several reasons this might be happening.
It might be that you are setting some state flags that persist between pages that influence the modal popups visibility. If you need help with this we will need some more details and preferably code samples.
It might be a browser caching issue. When you hit the back button the browser might be fetching the page from it's cache (not the server) with the popup visible. To test this you could disable the browsers cache and run through your process. If this proves to be the reason you can disable browser caching for your site by adding some meta tags (you'll find the exact tags on Google easily)

JQuery method for IFrame functionality

I have a aspx page (details page) that needs to be loaded in a modal window on a click of a button. I have buttons in the aspx page that calls server side functionality. So, this is similar to an IFrame way (except that it's now in a modal window)
Is there a JQuery way of doing this? It appears that the JQuery load loads only fragments of HTML
You can put an IFRAME in a jQuery UI Dialog.

How to refresh parent page from child page in asp.net 2.0

I have a page showing all products in a gridview.
I have a link in the page clicking on it opens a modal window.
In the modal window there is a form to enter product and save.
When I fill the form and save product I need to make the parent page to be refreshed so that
the new product is listed in the gridview and a message will be shown in a label in the modal window. I need to refresh the product list page without closing the modal window.
How to do it?
Please help.
You can refresh it with the following JavaScript:
window.opener.location.reload(true);
window.opener.location.reload(true);
true makes sure that the page is reloaded from the server instead of the browser's cache.
This will work only if the second page was opened by the first page using javascript and not when you open a link in the first page in a new window - window.opener will be null in the later case. Even in the former case, Firefox will throw a 'permission denied' error if both pages are not from the same domain.

Resources