Targeting a Page from a popup

They have: 296 posts

Joined: Sep 1999

I have made a popup console on http://www.noggy.net/testsite/
It is called the Noggy Console.
I can't seem to get the links on the popup to open up in the main window. I tried target _blank but it creates a new small window. How do I make it target the full open browser window?

Thanks

~Vy~

------------------
***********************
To spam or not to spam!
That is the question.
***********************

They have: 67 posts

Joined: Aug 1999

Hi,
Put this script in your pop up window.
<script>
function chgMainWinLoc( strPage ) {
parent.opener.document.location = strPage;
}
</script>

and then for your link.

<a href="javascript: chgMainWinLoc( 'YOUR_PAGE.html' )">Your Link</A>

where "Your_Page.html" is, change to the page you want to open. etc..

Let me know if it works. good luck.

Ian

------------------
Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

They have: 296 posts

Joined: Sep 1999

Hey Ian!

It works!! Thanks a lot but just one small problem. After clicking on more than 2 links I get a script error! Any idea why this is?
Have a look at www.noggy.net/testsite/
have a look for the Noggy Console!

Thanks

~Vy~

They have: 67 posts

Joined: Aug 1999

Hi,
if you are linking to pages out side of your site you will have to this script.

<script>
function remote(url){
window.opener.location=url
}
</script>

<a href="javascript: remote( 'YOUR_PAGE.html' )">YOUR-LINK</A>

that is more than likely your problem, I can't actually view your site as it is to processor intensive for my pc.

if you still have trouble, just post and I will try and figue it out for you.

Ian

------------------
Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

They have: 296 posts

Joined: Sep 1999

Thanks Ian,

I will try this out when I get home tonight and let you know how I get on!

~Vy~

Did you say my page wouldnt load on your machine? That's strange it is meant to be quite a fast loader (well so I hoped)

They have: 5,633 posts

Joined: Jan 1970

actually it loads sort of slowly here also, its the java that takes a while

They have: 296 posts

Joined: Sep 1999

I think it's my host

Somtimes the page loads instantly even with it deleted of cache and sometimes it takes a while. I am still with a free host that seem to have slow peaks

~Vy~

They have: 296 posts

Joined: Sep 1999

Just been verified.

My Host are reporting Server problems! Typical!

Only thing I can suggest is keep trying in a while.

Thanks

They have: 296 posts

Joined: Sep 1999

Hi Ian,

I tried your 2nd script also but I am still getting script errors! I just don't get it. I mean it works fine until you have clicked more than 2 or 3 links then it comes up with a script error!

~Vy~

They have: 67 posts

Joined: Aug 1999

Hi,
Correct me if I'm wrong.
To view it, I go to http://www.noggy.net/testsite/ and then click on the "Noggy Concole". Is that right?

Ian

------------------
Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

Webmaster A1 JavaScripts
A1 JavaScripts
Web Development - Big Resources Inc
BIG Resources.com

They have: 296 posts

Joined: Sep 1999

Yes Ian that's right. However I have still not uploaded your latest script to that page as I am still tweeking around with it on my hard drive.

~Vy~

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.