Random link generator

They have: 5,633 posts

Joined: Jan 1970

I've tried to write a page which will take you to a random link when you click a button, but for some reason it's not working.
http://www.clapham-common.demon.co.uk/tom/stuff/randomlink2.html

It's probably something really small, but I can't see what the problem is.

They have: 5,633 posts

Joined: Jan 1970

This line is your problem:- window.location="ranlink[gotolink]"

Try removing the quotes:-
window.location = ranlink[gotolink];

------------------
http://go.to/hass

They have: 5,633 posts

Joined: Jan 1970

Thanx Lloydhass

Now it works

I've also changed it so the random link comes up in a new page.

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.