# \_parent

**URL:** <https://forum.kirupa.com/t/-parent/35471>\
**Category:** Uncategorized\
**Created:** [November 14, 2003, 10:22am UTC](https://forum.kirupa.com/t/-parent/35471 "2003-11-14T10:22:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kitiara](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@Kitiara](https://forum.kirupa.com/u/Kitiara)\
**Post date:** [November 14, 2003, 10:22am UTC](https://forum.kirupa.com/t/-parent/35471/1 "2003-11-14T10:22:26Z")

</div>

Just a quick question. A browser spawns a popup site map. When you click on a link in the site map, the link should open in the first browser window and the focus switches back to the original.

I figured that setting the link target to \_parent should work for opening the page in the first browser as you’re linking from the child, but needless to say it doesn’t.

Any quick fixes out there?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:33am UTC](https://forum.kirupa.com/t/-parent/35471/2 "2003-11-14T10:33:28Z")

</div>

Can you use the focus function to switch to the original browser window.

else Parent.document.href = URL

Try this not to sure of its success rating but can it hurt to try?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:36am UTC](https://forum.kirupa.com/t/-parent/35471/3 "2003-11-14T10:36:02Z")

</div>

Uhmm… have you tried with window.opener, Kit? 🙂

```php
window.opener.location = "URL";

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:36am UTC](https://forum.kirupa.com/t/-parent/35471/4 "2003-11-14T10:36:38Z")

</div>

Focus might do it, I’ll give it a try. 🙂 I mean, this is what the link is at the moment:

```php
<a href="../../products/motor/car_getquote.htm" target="_parent" class="textpurplemini">Car 
          quotes</a>

```

Which I thought ought to do it alright… I’ve not really had much cause to use all this before, since I loathe popups, but the powers that be have decreed that it must be so… :sure:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:39am UTC](https://forum.kirupa.com/t/-parent/35471/5 "2003-11-14T10:39:18Z")

</div>

> \*Originally posted by kode \*  
> \*\*Uhmm… have you tried with window.opener, Kit? 🙂

```php
window.opener.location = "URL";

```

\*\*  
Er, no, I haven’t. 😊

It’s so dumb, I’ve never had cause to use this before. And how do you reference the main window (obviously the popup is named, but the main one isn’t). Is \_parent the right way?

God, must be “Stupid Question From Kit Day”. That or it’s my flu. Either way… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:42am UTC](https://forum.kirupa.com/t/-parent/35471/6 "2003-11-14T10:42:34Z")

</div>

> \*Originally posted by Kitiara \*  
> \*\*but the powers that be have decreed that it must be so… :sure: \*\*

Poor Kitiara some days you’re the Salmon and the stream is awefully long huh

:trout:

“awefully long” how English

Its Friday I just got paid and yet I’m cronically depressed - there’s something very wrong about that

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:45am UTC](https://forum.kirupa.com/t/-parent/35471/7 "2003-11-14T10:45:13Z")

</div>

“Remember, you are not a salmon.” 😛

I too am chronically depressed (and not paid till the 31st). Building teh entire Churchill website all over again by the end of today, a thousand and one little bug fixes to make, plus I can’t even remember simple JavaScript now… 🅰

Right, window.opener…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:45am UTC](https://forum.kirupa.com/t/-parent/35471/8 "2003-11-14T10:45:33Z")

</div>

Well, I don’t know if this is the right way or not (I’m an ActionScript guy, you know ;))… but it works:

```php
<a href="java **** script:window.opener.location='../../products/motor/car_getquote.htm',window.opener.focus();" class="textpurplemini">Car quotes</a>

```

[edit]Seriously… I think we should stop posting at the same time!! It’s confusing! :crazy:[/edit]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:49am UTC](https://forum.kirupa.com/t/-parent/35471/9 "2003-11-14T10:49:26Z")

</div>

Hmmm, lets try that…

Nope, not liking that, displaying ‘Page Not Found’ in the popup window.

I get the window.opener, but what’s the "about : " bit for exactly? I’ve never come across this…

[EDIT] Ah, hang on, you changed that! I’ll try again… 🙂 [/EDIT]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:53am UTC](https://forum.kirupa.com/t/-parent/35471/10 "2003-11-14T10:53:14Z")

</div>

Time for another simultaneous post no doubt… 🙂

That works perfectly, thanks. 🙂 **_Hugs_** I really ought to have thought of this. I’m so frazzled right now I can barely remember my own name… 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:53am UTC](https://forum.kirupa.com/t/-parent/35471/11 "2003-11-14T10:53:15Z")

</div>

Sorry… it was supposed to read _javascript_ but I forgot about the forum thing replacing that word. 😛

I didn’t fix it immediately because I broke one of my fingers a few hours ago and I can’t type faster!! ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:54am UTC](https://forum.kirupa.com/t/-parent/35471/12 "2003-11-14T10:54:02Z")

</div>

AIEEEE! I knew that was going to be a double post!!! 😛

Of course, I too forgot the forum changes it for some bizarre reason… I was wondering what about: was… Duh, silly me. 🙂

Eek @ the finger, btw. What on earth did you do to it Well, broke it, obviously, but you know what I mean… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:56am UTC](https://forum.kirupa.com/t/-parent/35471/13 "2003-11-14T10:56:51Z")

</div>

LOL @ Kit 😛

Ehmm… I broke it playing football with some friends, I was the goalkeeper. :beam:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 10:59am UTC](https://forum.kirupa.com/t/-parent/35471/14 "2003-11-14T10:59:32Z")

</div>

Ah… I had a friend who had that happen. For once, nothing to do with me. 🙂 Someone else volleyed the ball as hard as he possibly could, keeper went to catch it, ball flew past and took half his fingers with it… :sure:

Hope they get better soon. And thanks for the fix. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 11:02am UTC](https://forum.kirupa.com/t/-parent/35471/15 "2003-11-14T11:02:59Z")

</div>

You’re very welcome, Kit. :love:

Something like that happened to me, it was worth it though… we won! 😛  
And I hope so too (it’s really annoying!), thanks. =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 11:04am UTC](https://forum.kirupa.com/t/-parent/35471/16 "2003-11-14T11:04:10Z")

</div>

> \*Originally posted by Kitiara \*  
> \*\*“Remember, you are not a salmon.” 😛

I too am chronically depressed (and not paid till the 31st). Building teh entire Churchill website all over again by the end of today, a thousand and one little bug fixes to make, plus I can’t even remember simple JavaScript now… 🅰

Right, window.opener… \*\*

Ok old I know but just think of the mahoney

Oh yes yes yes

_feint smile_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 2:08pm UTC](https://forum.kirupa.com/t/-parent/35471/17 "2003-11-14T14:08:09Z")

</div>

Awww i’m late, I totally knew the answer to this too ☹

Kax is always stealing my threads… :bad:

hehe, just kidding 😊 (about the thread stealing)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 2:23pm UTC](https://forum.kirupa.com/t/-parent/35471/18 "2003-11-14T14:23:22Z")

</div>

Me? Stealing your threads!? Shame on you…

Where the hell are you when we need you!? 😛

😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 2:25pm UTC](https://forum.kirupa.com/t/-parent/35471/19 "2003-11-14T14:25:11Z")

</div>

Down the pub I’m guessing!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 14, 2003, 2:27pm UTC](https://forum.kirupa.com/t/-parent/35471/20 "2003-11-14T14:27:54Z")

</div>

I know ☹ Sorry ☹

They need to start making grills with built in computers so I can surf while cooking at work!!!

> Oh, that steak isn’t done yet, let me post for a bit on the GrillMaster PC

[Next page](https://forum.kirupa.com/t/-parent/35471.md?page=2)
