Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2004, 08:41 AM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default disabling the toolbar

is it possible to disable the toolbar on the new window...for example if i have the following code in one of my "doc.htm" file:

Code:
<a href="doc3.htm">Click here..</a>
and i want this doc3.htm to open in the same window but with tooolbar, location, directories, status etc. to be disabled. is this possible? thanks

 
Old July 23rd, 2004, 08:50 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default


Code:
<a href="javascript:window.open('doc3.htm', '', 'width=100,height=200,scrollbars=yes,resizable=yes');">
HTH!

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old July 23rd, 2004, 08:54 AM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for the code...but this code will open doc3.htm in a new window, which i dont want. i want to replace the page inside doc.htm with doc3.htm with all the new properties applied.

what exactly i mean is, when i am clicking for the doc3.htm the toolbar, locationbar, scroolbar etc. should get disabled. you can also say it as:

window.open(doc3.htm,properties etc. here)
window.opener.close()

but this code doesnt work as browser isn't permitting this. can you plz. give me some other ideas.

 
Old July 23rd, 2004, 08:59 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

That's not possible.
Don't crosspost.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old July 23rd, 2004, 09:00 AM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am sorry for last reply...without checking...actually i had tried this using a function like:

<a href="newwindow()">click here</a>

and in the newwindow() function writing the same code..but didnt worked for me. i thought your code will also give me the same output. extremely sorry for my last message.

also can you tell me how can i auto close windows generated by some window. For example: if doc2.htm was generated by clicking doc.htm, will it be possible that doc2.htm also gets closed automatically when doc.htm is closed as doc.htm was the main window from which doc2.htm was generated. if you aren't able to understand my doubt then plz. let me know..i will write it again in detail.

 
Old July 23rd, 2004, 09:14 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

It goes something like:
<body onunload='popupname.close();'>

You have to supply a name for the popup window upon calling on the window.open method. This is done in the second argument.

window.open('doc2.htm', 'popupname', 'additional options');

The functionality that you are looking for may be available for Mozilla with the use of a signed script, however other browsers don't provide this.

http://www.mozilla.org/projects/secu...d-scripts.html
http://www.google.com/search?q=signe...script+mozilla

The option titlebar=no is available only with a signed script, and it turns off the titlebar. In fact, in Mozilla, all aspects of the window's display are customizable with a signed script.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old July 25th, 2004, 09:56 AM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello, in your first provided code:
Code:
<a href="javascript:window.open('doc3.htm', '', 'width=100,height=200,scrollbars=yes,resizable=yes');">
the doc3.htm is opened, but at back the window doesnt get closed but it shows soem page with text "[object Window]" and the url of it is: "javascript:window.open('doc2.htm','Control Panel','resizable=no,scrollbars=no,toolbar=no,loca tion=no,directories=no,status=no,menubar=no,copyhi story=no')".

I am using Mozilla Firefox 0.9 browser. Can you tell me why is this so and how can i remove it?






Similar Threads
Thread Thread Starter Forum Replies Last Post
disabling refresh shruthi Beginning PHP 0 November 16th, 2004 05:10 AM
Disabling Refresh mildge Beginning PHP 1 December 22nd, 2003 01:00 PM
Disabling Tabpage rajustha VB How-To 0 December 9th, 2003 10:11 PM
Is there any way of disabling logging? chrislepingwell SQL Server 2000 1 October 9th, 2003 11:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.