To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 5200
5199  |  5201
Subject: 
need (JavaScript) help, please!
Newsgroups: 
lugnet.off-topic.geek
Date: 
Sun, 4 May 2008 22:37:34 GMT
Viewed: 
8156 times
  
I'm trying to code a script, for inclusion into a webpage (HTML), that will
enable me to spontaneously create a link to be opened as a new page.  The format
of the URL is as follows:

http://SERVER.gamesite.com/playerstats.html?target=PLAYERNAME

The two variables are the specific game server and the specific player.  I'm
able to get the necessary URL.  What I'm not able to achieve is having this
script open a -new- window for the resulting URL.  When I include the usual
"target='_blank'" in the HREF tag, it doesn't work at all.

Here's the (JavaScript) code I'm currently using:

document.location.href = 'http://' + SERVER +
'.gamesite.com/playerstats.html?target=' + PLAYERNAME

Please help!  :(

Thanks in advance!  :)
Franklin



Message has 1 Reply:
  Re: need (JavaScript) help, please!
 
(...) What you're doing there is setting the current document's URL to some value-- in this case some URL that looks like: (URL) that will open the new URL just fine, it'll just take the place of your current document. What you want is to open a new (...) (16 years ago, 4-May-08, to lugnet.off-topic.geek)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR