Robb Hill
asked on
URL with Parameters refresh
I open an external url with parameters from within a mvc3 web application. Once I open the url I have two windows open. If I click within the main application I would like two things to happen. Close the new window that was open...or refresh it with new parameters based on what was clicked from the primary .net app. Currently it is just a "dead window" at this point...i would like it to stay interactive with the primary window. Meaning the ability I guess to keep it open, or refresh with new params. I am not using frames..this is html5.
Thanks in advance
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
something like this code I found...but using jquery..and I do not have any of the buttons. Would prefer to stick with the .live('click', function....approach.
(function() {
var childWindow;
document.getElementById('btnOpen').onclick = openChildWindow;
document.getElementById('btnClose').onclick = closeChildWindow;
document.getElementById('btnRefresh').onclick = refreshChildWindow;
function openChildWindow() {
if (childWindow) {
alert("We already have one open.");
}
else {
childWindow = window.open('http://jsbin.com/awiri4');
}
}
function closeChildWindow() {
if (!childWindow) {
alert("There is no child window open.");
}
else {
childWindow.close();
childWindow = undefined;
}
}
function refreshChildWindow() {
if (!childWindow) {
alert("There is no child window open.");
}
else {
childWindow.location.reload();
}
}
})();
so close it and reopen a new one
ASKER
Well it works like that now..if I close it...and reopen manually its fine..if I reclick the help button...it will reload the page.
I need the parent and child windows to continually refresh......perhaps like ping of each other....not sure how to implement this idea
I need the parent and child windows to continually refresh......perhaps like ping of each other....not sure how to implement this idea
use ref.location.href = "the new url";
ASKER
thats not working...thats just opening a new window.
Please refer to the question.
I need this parent and child window to talk to each other. There is no static url to redirect to.
Please refer to the question.
I need this parent and child window to talk to each other. There is no static url to redirect to.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
3rd party solution is not what I need. that was a suggestion from someone else on EE.
ASKER
Open in new window