There are two ways to do it, PHP or Javascript.
- PHP.
place this code before any html ouput and check it when the form submit button is pressed.
if ($value == "update") {
header("Location: http://www.update.com");
exit;
}
if ($value == "delete") {
header("Location: http://www.delete.com");
exit;
}
- Javascript
<form name="form">
<select name="list" onChange="update()">
<option value="www.update.com">Update
<option value="www.delete.com">Delete
</select>
<a href="updatelink"><B>Go</B></a>
</form>
<script language="javascript">
pos = 9999;
for(num=0;num<document.links.length;num++) {
if (document.links[num].href.indexOf("updatelink") != -1) {
pos = num;
num = 5000;
}
}
function update() {
if (pos!=9999) {
sel = document.form.list.selectedIndex;
document.links[pos].href = document.form.list[sel].value;
}
}
update();
</script>
Hope this helps