Print Page | Close Window

Site map in pop up window

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4139
Printed Date: 29 March 2026 at 12:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Site map in pop up window
Posted By: dotty
Subject: Site map in pop up window
Date Posted: 08 July 2003 at 2:40pm

Hi,

I would like to have a site map on a pop up window - does anybody know how to get the links from the pop up map to change the pages on the existing parent window rather that opening new windows?

I'd really appreciate help on this,

ta



-------------
bear with me....



Replies:
Posted By: kasl_33
Date Posted: 11 July 2003 at 3:54pm

I am in the same boat as you, let me know if you find out.



-------------
http://www.kasl.info - www.kasl.info

The PHP/MySql Web Development site


Posted By: dj air
Date Posted: 12 July 2003 at 3:55am

i think i know what you want just just to clarify.

you have the site map in a pop up window.

say you have a link in the pop up window called about us ...

when you click thelink "about us" in the pop up window you want the parent window to take you to the about us page.

do you want the ste map window to close as well??

if what i just stated above what you want you can use the code below.

 

<script language="JavaScript">

//Function to open link in main window
function openInMainWin(winLocation){
 window.opener.location.href = winLocation
 window.opener.focus();
 window.close();
}
</script>

the link should look like this

<a href="javascript:openInMainWin('Licence.asp)">
              Click Here</a>

if you have any problems reply back



Posted By: kasl_33
Date Posted: 12 July 2003 at 10:05am

AMAZING!!!!!  Thank you very much, it worked exactly the way I wanted.  You wouldn't beleive how many hours I spent searching for that code.

The crazy thing is that I had the code in the <script></script> tags, just not at the links.

Again, thank you very much!



-------------
http://www.kasl.info - www.kasl.info

The PHP/MySql Web Development site


Posted By: abhinav
Date Posted: 12 July 2003 at 11:19pm
nice find .. i can use it too!

-------------
http://www.sgkabra.com - Accountancy Firm | http://www.mp3oldies.com.ar - Mp3 Oldies | http://www.best-mp3software.com - Mp3 Software


Posted By: dotty
Date Posted: 13 July 2003 at 1:02pm

Thanks dj air - that is a really useful script - you're a genius!

kasl_33 - is that a mug shot or a holiday snap?



-------------
bear with me....


Posted By: dotty
Date Posted: 13 July 2003 at 1:03pm
Do I change to a groupie when I hit the 40 mark?

-------------
bear with me....


Posted By: dotty
Date Posted: 13 July 2003 at 1:04pm
Hey - I did!!

-------------
bear with me....


Posted By: Bliss
Date Posted: 14 July 2003 at 12:47pm
BTW, are you guys manually doing a site map, or do you have some code or component that does it?


Posted By: dotty
Date Posted: 15 July 2003 at 3:52am

The current site map I am doing manually but you can get a programme to do it for you.  I don't know of any free ones but you can check out the one at this site : http://www.xtreeme.com - www.xtreeme.com

They do great dynamic menus too.

I have only evaulated their programme - I was going to buy a liscence when my windows 98 crashed spectacularly due to a virus (chernobyl -beware).  Weeks of retrieving lost work and one new hard drive  later I am reluctant to download anything from that site.  It may only be a coincidence that the crash happened when I was using their product.

If anybody knows of an alternative way of producing a site map - I would be interested.

bye



-------------
bear with me....


Posted By: dotty
Date Posted: 15 July 2003 at 11:57am

Hello Again

The code is great - do you know how it could be done using a submit button on a form?

??



-------------
bear with me....


Posted By: Flamewave
Date Posted: 15 July 2003 at 12:56pm

Call the function using the onClick handler of the submit button, ex:

<input type="submit" value="Open Window" onClick="openInMainWin('link.asp')">



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.


Posted By: dotty
Date Posted: 15 July 2003 at 5:23pm

Thanks a million for that - it will make my website much neater.



-------------
bear with me....


Posted By: pedalcars
Date Posted: 06 August 2003 at 7:42am
Looks very much like something I'm after, but can it be modified so that a document does this automatically when opened, rather than the viewer having to click anything?

http://forums.webwiz.net/forum_posts.asp?TID=4798&PN=1&TPN=1 - This post explains why I want this!

Ta

-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels



Posted By: pedalcars
Date Posted: 06 August 2003 at 7:58am
Originally posted by dj air dj air wrote:

if you have any problems reply back



Problem: Doesn't want to work in Opera!!!



(Yes I have got javascript turned on!)

-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels



Posted By: pedalcars
Date Posted: 06 August 2003 at 8:09am
Here's another way of writing the link, that DOES work in Opera and IE (haven't tried any other browsers yet):

<a href="filename.asp" onClick="openInMainWin('filename.asp')">Go to filename.asp page</a>

NB. Would still be interested in an auto-redirect that did the same thing

-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels



Posted By: Flamewave
Date Posted: 06 August 2003 at 8:28am

Quote Looks very much like something I'm after, but can it be modified so that a document does this automatically when opened, rather than the viewer having to click anything?

In the body tag of the html document:

<body onLoad="openInMainWin('filename.asp')">



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.


Posted By: pedalcars
Date Posted: 06 August 2003 at 9:20am
Fantastic, thanks.

So simple when you know how!



-------------
http://www.pedalcars.info/ - www.pedalcars.info

The most fun on four wheels



Posted By: kasl_33
Date Posted: 14 August 2003 at 12:11am

Originally posted by pedalcars pedalcars wrote:

Here's another way of writing the link, that DOES work in Opera and IE (haven't tried any other browsers yet):

<a href="filename.asp" onClick="openInMainWin('filename.asp')">Go to filename.asp page</a>

NB. Would still be interested in an auto-redirect that did the same thing

I don't know if you just need an auto-redirect script or what you need, but try this: 

<meta http-equiv="refresh" content="5; url=filename.asp">

the 5 is for how many seconds until it refreshes, the filename is the destination.



-------------
http://www.kasl.info - www.kasl.info

The PHP/MySql Web Development site



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net