|
|
I'm trying to refresh a parent window after opening a window using window.open. Not having any success.
I've tried using
window.parent.refresh()
window.parent.reload()
before using
window.close()
I'm calling the function from an onclick eventhanlder associated to a form button.
Looks something like this.
function whoAmI
if statement is met
call window.open(url) function
window pops up
User then completes two form fields to set two cookies
User selects the submit button an fires off onclick evenhandler - referenced above.
that is when I need to refresh the parent window - not having any luck
Please help
Thanks mhc
|
|
|
|
try refreshing the main window after popup close
window.close(..)
parent.refresh()
|
|
|
|
Use this to close the child window and then refresh the parent window. This works for me.
window.close();
if (window.opener && !window.opener.closed) {
window.opener.location.reload();
}
|
|
|
|
Hi Dhanlakshmi , i have used your above given code , and i got solution from it.
Thanks lot.
|
|
|
|
how to know the status of parent window from being on the child window..wheather parent window closed or not..
|
|
|
|
I have used your code but it works only after i refresh the page once,
after refreshing one time.. the JS works fine...
help ?!! :(
|
|
|
|
|
|
|
|
Ok, the tests are online, just tell me what I am doing wrong with the selector I am using... debt management I should tweak the original demo to make things to apparently work... ;-)
I cannot make "table#test td" work in your match, but that does not work in DomQuery either so I believe there is still some bug there. I should change the selector to just "td" to see all the cells highlighted. I changed the order of parameters in your match code to fit my needs in these tests, (element, selector).
In cssQuery/jQuery it takes too long but time does not matter here, and the reason they take to long is because they first collect all the nodes matching the selectors, which is not needed in our implementation. So move the mouse slowly on the "X"...
However I bet both Dean and John can extract a faster Match(element, selector) from their current project. My only purpose with these test was to show that this is doable and work as expected in all frameworks bad credit loan .
Your sample code is good enough to also convince me that this can be done with selectors, and letting the most complicated options out I hope will give us acceptable speeds in most situations.
To give you a hint about why something is wrong with match, you will see that in my code I am doing also ancestors, I mean if an ancestor match we will also need to return true. Hope it helps.
This is not a benchmark...I may have failed to write the selectors, and I may have failed in using the wrong methods in these libraries.
What I notice, and didn't think of before, in your example with my match function is there is no use of the CSS selector cascade and specificity. This is noticeable where the first set of "x" elements are supposed to have a yellow background but have a blue background mortgage loan .
The API could be made to look even more like CSS
NW.Event.appendDelegate('table#test td', {
mouseover: function() {this.style.backgroundColor="yellow";},
mouseout: function() {this.style.backgroundColor="";}
});
The "one shot" remove delegate is not working in the example because the important line is commented. (If I click the buttons multiple times I see multiple alerts.) Even if it was working and if my brief look gave me an idea of what you are trying to achieve, I don't like the idea of being able to make a particular element exempt from a behavior if it still matches the selector. I think it would be better to make the element no longer match the selector in some way. If the CSS specificity and cascade is used then a new class name could be added to the element and a later "appendDelegate" statement could override the "one-shot" behavior current mortgage rates .
|
|
|
|
Just read at www.pathtoolong.com
|
|
|
|
just add this script n call the function on the specific event u want to close ur pop up window and refresh the parent window automatically.
<script language="JavaScript">
<!--
function refreshParent() {
window.opener.location.href = window.opener.location.href;
if (window.opener.progressWindow)
{
window.opener.progressWindow.close()
}
window.close();
}
//-->
</script>
|
|
|