I'm trying to change the form action so that where it goes to is dependent on a text box
This is the form code
<form id="decks" name="decks" method="post" action="master.php">
<table width="300" border="0">
<tr>
<td width="125">Card to edit: </td>
<td width="175">
<select name="deck" onchange="actionchange()">
<option value=" "> </option>
{insert name="mastered" script="../smartylib/plugins/insert.umaster.php"}
</select>
</td>
</tr>
<tr>
<td><div align="right">
<input name="Submit" type="submit" id="Submit" value="Select Set" />
</div></td>
<td><div align="left">
<input name="Reset" type="reset" id="Reset" value="Reset" />
</div></td>
</tr>
</table>
</form>
This is the javascript code i have
// JavaScript Document
function urlload() {
var obj = document.getElementById('url');
var url = obj.options[obj.selectedIndex].value;
document.badge.src=url
}
function actionchange() {
document.decks.action = "http://midnighttempest.com";
}
function pload() {
urlload()
actionchange()
}
window.onload = pload
I want to be able to get the value of the deck drop down box and change the action so that it reads
master.php?deck=deck.value
but i can't even get the one above working. No error, just doesn't do anything.