Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Signature-free discourse for serious web publishers > YOUR CREATION: Building & Maintaining A Web Site > Web Design and Webmaster Issues
User Name
Password
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-31-2001, 05:23 AM   #1
Id4ever
Registered User
 
Join Date: Nov 2000
Location: Norway
Posts: 22
Question JavaScript help

Hi!

I'm looking for some JavaScript code that would let me do this:

On one of my pages I have a special link that links to some page. When a visitor clicks on this link, I want to have his/her browser to follow the link, but in addition a new browser window should pop-up with a URL of my choice. How can this be done?

I know that I could do something like this with an onUnload() command, but then the popup would also appear if the visitor clicks on another link or the browser's back button. I don't want that to happen.

I'm looking forward to some expert help http://geekvillage.com/ubb/smile.gif

------------------
Id4ever
Freeware Gaming - Popular Domains
Id4ever is offline   Reply With Quote
Old 03-31-2001, 05:47 AM   #2
Id4ever
Registered User
 
Join Date: Nov 2000
Location: Norway
Posts: 22
Lightbulb

Never mind, I managed to work it out myself http://geekvillage.com/ubb/smile.gif

If anyone's interested, here's the code to do what I wanted:

<script language="JavaScript">
function PopUp()
{
window.open("http://mypopup.com/", "MyWindow", "toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=yes, copyhistory=no, scrollbars=no, width=200, height=200");
**
</script>

Put this in your <a> code:

onclick="PopUp()"

------------------
Id4ever
Freeware Gaming - Popular Domains
Id4ever is offline   Reply With Quote
Old 03-31-2001, 06:21 AM   #3
scnofx
Member.
 
Join Date: Mar 2001
Posts: 253
Unhappy

even easier:

<a href="page.html" onclick="window.open('poppage.html')">LINK</a>
scnofx is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript help needed coolshop Web Development - Programming / Coding 4 11-21-2001 02:01 PM
javascript popup error with AOL - PLEASE HELP theDirtiest Web Development - Programming / Coding 3 10-06-2001 08:19 AM
Popups, Cookies, & Javascript... Help! :) Uneek Web Development - Programming / Coding 0 09-20-2001 10:57 AM
Javascript within Javascript ???? 1lit Web Design and Webmaster Issues 0 11-26-2000 04:19 PM
Javascript Website Waldo000000 Web Design and Webmaster Issues 3 04-22-2000 06:10 AM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 03:18 PM.


GeekVillage.com is copyright © 1998-2015 Curiosity Cave - Science gifts for clever kids. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.