I use the script below to open a side panel on my desktop without all the
buttons and menu items. IE 6
It works well.
What I'd like to add is add a line of code that will close the calling
parent window (right now I make it visible by resizing it and clicking on a
close link). I'll even settle for having to confirm the closure but, the
ultimate would be that it would close by itself.
KD
================================
<html>
<title>MySideBar</title>
<body bgcolor="#FFFFFF" onLoad="OpenSideBar()">
<script language="JavaScript">
<!--
// This function moves the window when the page is loaded
// to the top left corner and resizes it then opens a side window panel
// ideally I want it to close the calling browser window, even if asked to
confirm
//
function OpenSideBar()
{
self.moveTo(0,0)
self.resizeTo(300,300)
window.open("http://www.google.ca","MySideBar","width=150,height=965,l eft=0,
top=0,location=no,menubar=no,resizable=no,scrollba rs=yes,status=no,toolbar=n
o,fullscreen=no")
}
function CloseWindow()
{
self.close()
}
-->
</script>
<div align="right">
<table border="0">
<tr>
<td><a href=javascript:CloseWindow()> Close Window</a>
</tr>
</table>
</div>
</body>
</html> 2 3045
kevin dalby wrote: I use the script below to open a side panel on my desktop without all the buttons and menu items. IE 6 It works well. What I'd like to add is add a line of code that will close the calling parent window (right now I make it visible by resizing it and clicking on a close link). I'll even settle for having to confirm the closure but, the ultimate would be that it would close by itself.
KD
================================ <html> <title>MySideBar</title> <body bgcolor="#FFFFFF" onLoad="OpenSideBar()"> <script language="JavaScript"> <!-- // This function moves the window when the page is loaded // to the top left corner and resizes it then opens a side window panel // ideally I want it to close the calling browser window, even if asked to confirm // function OpenSideBar() { self.moveTo(0,0) self.resizeTo(300,300) window.open("http://www.google.ca","MySideBar","width=150,height=965,l eft=0, top=0,location=no,menubar=no,resizable=no,scrollba rs=yes,status=no,toolbar=n o,fullscreen=no") } function CloseWindow() { self.close() } --> </script>
<div align="right"> <table border="0"> <tr> <td><a href=javascript:CloseWindow()> Close Window</a> </tr> </table> </div> </body> </html>
<script type="text/javascript">
window.open("http://www.google.ca","MySideBar","params_here")
window.opener = window;
window.close();
</script>
Is all you need.
--
Randy
Thanks for the Tip - works like a dream.
KD
"Randy Webb" <hi************@aol.com> wrote in message
news:Hr********************@comcast.com... kevin dalby wrote:
I use the script below to open a side panel on my desktop without all
the buttons and menu items. IE 6 It works well. What I'd like to add is add a line of code that will close the calling parent window (right now I make it visible by resizing it and clicking
on a close link). I'll even settle for having to confirm the closure but,
the ultimate would be that it would close by itself.
KD
================================ <html> <title>MySideBar</title> <body bgcolor="#FFFFFF" onLoad="OpenSideBar()"> <script language="JavaScript"> <!-- // This function moves the window when the page is loaded // to the top left corner and resizes it then opens a side window panel // ideally I want it to close the calling browser window, even if asked
to confirm // function OpenSideBar() { self.moveTo(0,0) self.resizeTo(300,300)
window.open("http://www.google.ca","MySideBar","width=150,height=965,l eft=0,
top=0,location=no,menubar=no,resizable=no,scrollba rs=yes,status=no,toolbar=n o,fullscreen=no") } function CloseWindow() { self.close() } --> </script>
<div align="right"> <table border="0"> <tr> <td><a href=javascript:CloseWindow()> Close Window</a> </tr> </table> </div> </body> </html>
<script type="text/javascript"> window.open("http://www.google.ca","MySideBar","params_here") window.opener = window; window.close(); </script>
Is all you need.
-- Randy This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Carol Lyn |
last post by:
Could use your assistance with this. I have a window that opens via
onclick and it is a small window with info about a site. If the user
is interested in visiting that site, there is a link to...
|
by: Martin Nadoll |
last post by:
Hello,
i want to close a popup-window with the onBlur eventHandler.
function closeIt() {
setTimeout('window.close()',2000); }
<body onBlur="closeIt()">
html
</body>
|
by: JSjones |
last post by:
when a form is submitted from the main window i want a pop up window
to open from the onclick event. i have that working, now how can i
close the pop up window from the main window after the main...
|
by: Jens Peter Hansen |
last post by:
Hi
From my main window I open a series of popup (one close - next opens)
in a mockup for a registration proces.
From the last popup, I want to click a buttom, so the popup closes and
the URL in...
|
by: Colin Graham |
last post by:
Hi guys,
Just a quickie here that i hope someone can help me with. Basically i
want stop the user from closing the popup window using the small x
button in the top right hand corner. Im aware...
|
by: Sunil Sabir |
last post by:
Dear All,
I have a Main Asp.Net page . In that Page I have a Tab Strip which has
SIX tabs each representing a different web Forms.So that when a user
clicks different tab he can navigate between...
|
by: Chris |
last post by:
Hi,
I have been trying for days, yes days, to use the calender from the asp.net
timetracker starter kit. I am now frustrated. I finally get the popup
calender to popup but when I click ok to...
|
by: Jaggu |
last post by:
Hi ,
I need to close main window, once the child window succesfully opens
else main window to remain. In my case when I close the main window
immediately after the "window.open()" as mentioned...
|
by: michal.podlewski |
last post by:
Hi All,
I have a problem with a simple (as I thought till now) thing:
I want to make a link in a child-window which would change site in the
parent-window and along with closing child window. The...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |