The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> CLosing Parent Window on Child Window open?
David_Hayden
post Aug 8 2007, 07:06 PM
Post #1


Newbie
*

Group: Members
Posts: 10
Joined: 6-August 07
Member No.: 3,502



I'm trying to do one of two things;
a.) Have the new page open in the current browser window
b.) failing that, have the original page close once the new page is opened.

I've seen a couple of scripts that will do the above, but I'm not sure how to work that into the current links I have which also keep things like the toolbar, menubar, scrollbars, etc from showing up (the link code is listed below).

<a href="java script://" onclick="java script: window.open('http://www.geocities.com/david_hayden_cj/course_template_page_2b.htm','newwindow',config='height=700,width=1100, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no')"><img src="previous_arrow.gif"></a>

Any suggestions?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Aug 8 2007, 07:46 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



My advice? Here you go:
  • Don't use href="java script:..." links. Use the HREF attribute for a real URL.
  • Stop trying to muck with the browser (toolbar, menubar, scrollbars, etc.). It isn't your browser.
  • Just use normal links and the page will open in the current browser window, assuming the user doesn't choose to open it in a new window/tab.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Aug 9 2007, 01:08 AM
Post #3


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



What you're trying to do is called vandalism. Here's a bit of help for Firefox users:

In Edit > Preferences > Content, enable Javascript, then go to the "Advanced" button for Javascript, and turn off everything - resizing windows, interfering with context menus, etc. This will allow useful scripts, but stop practically all stupid web tricks.

Oh, and if a popup window announces you've won the lottery, rush off quick to collect your money! <g value=not>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
David_Hayden
post Aug 9 2007, 09:56 AM
Post #4


Newbie
*

Group: Members
Posts: 10
Joined: 6-August 07
Member No.: 3,502



QUOTE(Darin McGrew @ Aug 8 2007, 08:46 PM) *

[*]Stop trying to muck with the browser (toolbar, menubar, scrollbars, etc.). It isn't your browser.
[/list]


Actually it is, or more precisely it's the company's browser, as this is for an internal training course and not a public web application. But I appreciate your other advice - using the JavaScript to set the initial window parameters and then relying on regular HTML links seems to be the solution I was looking for. Thanks for your help!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
David_Hayden
post Aug 9 2007, 09:57 AM
Post #5


Newbie
*

Group: Members
Posts: 10
Joined: 6-August 07
Member No.: 3,502



QUOTE(Brian Chandler @ Aug 9 2007, 02:08 AM) *

What you're trying to do is called vandalism. Here's a bit of help for Firefox users:

In Edit > Preferences > Content, enable Javascript, then go to the "Advanced" button for Javascript, and turn off everything - resizing windows, interfering with context menus, etc. This will allow useful scripts, but stop practically all stupid web tricks.

Oh, and if a popup window announces you've won the lottery, rush off quick to collect your money! <g value=not>


So those lottery pop-ups aren't real? Damn........ blush.gif

Not so much trying to vandalize innocent users browsers as create an internal training course, and the navigation and menus aren't really necessary or helpful. Thanks though.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 02:51 PM