I have a form that has javascript actions on it
<form name="form" id="formid">
<select multiple size='5' name="sel1" onchange="myfunction(this.options[this.selectedIndex].value)" >
<option value='foo.doc'>Foo</option>
<option value='foo2.doc'>Foo 2</option>
</select>
</form>
THis is probably really simple ut I have been trawling the web for ages and can`t find the answer, how do I make the above work on a set of links instead of a form, i.e.
<a href='onclick="myfunction(foo.doc)"'>foo</a><br />
<a href='onclick="myfunction(foo2.doc)"'>foo 2</a><br />
Thanks
<form name="form" id="formid">
<select multiple size='5' name="sel1" onchange="myfunction(this.options[this.selectedIndex].value)" >
<option value='foo.doc'>Foo</option>
<option value='foo2.doc'>Foo 2</option>
</select>
</form>
THis is probably really simple ut I have been trawling the web for ages and can`t find the answer, how do I make the above work on a set of links instead of a form, i.e.
<a href='onclick="myfunction(foo.doc)"'>foo</a><br />
<a href='onclick="myfunction(foo2.doc)"'>foo 2</a><br />
Thanks