|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I can open a new window, but how do i target back the old winow?
Hi
I want to know how I can target the old window and change its url. For ex., I have two windows; one is the main window, the other is a confirmation like window. When a user confirms, the url on the main window would change to another page. How would I go to accomplish this? Thanks |
|
#2
|
|||
|
|||
|
RE: I can open a new window, but how do i target back the old winow?
In javascript you can reference the main window by the opener property. eg:
<a href="#" onclick="opener.location.href='otherurl.html';window.close( );">confirm</a> else if the main window is a frame with the name property set, or has it's name property set through javascript, you can simply specify it with the target property. eg mainwindow has this in it's <head> section: <script type="text/javascript"> window.name = 'main'; </script> now you can do this in your popup: <a href="otherurl.html" target="main">confirm</a> |
|
#3
|
|||
|
|||
|
RE: I can open a new window, but how do i target back the old winow?
Thanks, but where does this go
<a href="#" onclick="opener.location.href='otherurl.html';window.close( );">confirm</a>? in the main window? And why is there a window.close()? how would i specify the confirm window dimensions? |
|
#4
|
|||
|
|||
|
RE: I can open a new window, but how do i target back the old winow?
It goes in your popup window. I put in the window.close() in case you wanted to close the popup. If not, you can discard it.
To open a popup with dimensions and such you will also need javascript. Try searching on window.open and I'm sure you'll find a bunch of examples |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > I can open a new window, but how do i target back the old winow? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|