View Full Version : Help!

Elven Mystress
02-12-2004, 09:13 AM
Hello! I am new to the board and I have a question. I am giving myself a serious headache with this and I am hoping you know how to help. I got the following code from this site and I need it altered just a tad and I am unable to do it correctly. This code is for Random Link display. I need it to open in a NEW window instead of taking visitors away from my site.

Please Help!

Random link button- By JavaScript Kit (http://javascriptkit.com)
Over 300+ free scripts!
This credit MUST stay intact for use

//specify random links below. You can have as many as you want
var randomlinks=new Array()


function randomlink(){
<p><input type="button" name="B1" value="Mystery Links!" onclick="randomlink()"></p> </form>

<!--Uncomment below to use a regular text link instead
<a href="javascript:randomlink()">Random Link</a>

02-18-2004, 03:00 PM
Welcome here !

Some of the reasons why noone reacts are probably:
- this is posted in the wrong forum, since it's clientsided javascript
- the subject is the top 1 example of poor subjecttitles --> read the posting guidelines, please : http://www.codingforums.com/postguide.htm
- opening in a new window is poor coding practice so some peole wount tell you how, because they don't wan't to promote it:
*opening links in a new window, just because you fear that the user wil not come back to your site, says quite a bit about your site : if it's any good, then people will return to it.
* the newer xhtml standards doen't even include targets.
* the newer user agents like palms etc doen't work with windows --> it's a doomed to extinct concept
* popup blocker issues that will prevent some clients from being able to follow the links
- a quick google search or a search on this forum will tell you how toopen a link in a new window