Need Help With Simple JavaScript Code.... (Please Help ASAP)

SaturnX

Diamond Member
Jul 16, 2000
3,415
0
76
Hey,

The code I need is really simple.. though I'm having difficulties.

This is what I want to do, I want to call a link like so:

<a href="javascript:ssopen(game)">Open Link</a>

And what I need it to do is add whatever is in the brackets to a set web address, so the final output and navigation is to

www.website.com/game

Any help would be greatly appreciated.

--Mark



 

kritikal

Member
Feb 28, 2001
45
0
0
<html>
<head>
<script>
function ssopen ( dir )
{
document.location = "http://idvanx.com/" + dir;
}
</script>
</head>
<body>

<a href="javascript:ssopen('cal')">link</a>
</body>
</html>