Pfad hinter Link ändern

tomi83
Hallo,

ich (JavaScriptnewbie) bin schon seit einiger Zeit auf der Suche, doch leider habe ich bei google und co. nichts nützliches dazu gefunden:
Auf meine Site sollen 3 Links. Mit zwei dieser Links soll der Pfad hinter dem dritten abgeändert werden.
Hier mein erster Ansatz:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
<html><head>
<title>SChrott</title>
<script language="JavaScript">
function linkWechsel(wert)
{
	if((wert == "1") 
	{
		parent.window.location.link1.href = 'http://www.heise.de';
    }
	elseif(wert == "2")
	{
		parent.window.location.link1.href = 'http://www.google.de';
    }
}
</script>
</head>
<body>

<a href="#" onClick="linkwechsel('1')">LINKWECHSEL1</a>
<a href="#" onClick="linkwechsel('2')">LINKWECHSEL2</a>
<p>
<a href="" name="link1">LINK</a>

</body>




Ich hoffe ihr könnt mir weiterhelfen...
tkshorty
weiß zwar net was du damit vorhast? vielleicht sowas wie ´link des tages oder so? naja so müsste es klappen:
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
<html><head>
<title>SChrott</title>
<script language="JavaScript">
function linkWechsel(wert)
{
	if(wert == 1)
	{
		link1.href = 'http://www.heise.de';
	}
	else if(wert == 2)
	{
		link1.href = 'http://www.google.de';
	}
}
</script>
</head>
<body>

<a href="#" onClick="javascript:linkWechsel(1)">LINKWECHSEL1</a>
<a href="#" onClick="javascript:linkWechsel(2)">LINKWECHSEL2</a>
<p>
<a href="#" name="link1">LINK</a>

</body>

tomi83
Vielen Dank tkshorty, funktioniert super!