M
Mattias Campe
Hello,
On http://student.ugent.be/astrid/bewoners.php I got the problem that I
want Javascript to let my browser go to
http://student.ugent.be/astrid/bewoners.php?beginAcjaar=2002 when I
select 2002-03 in the form in the upper right corner (idem dito for the
other years).
My form is composed by:
<form method="post" action="bewoners.php">
<select onchange="veranderAcjaar()" name="selecteerAcjaar">
<option>2001-02</option>
<option>2002-03</option>
<option>2003-04</option>
</select>
</form>
and my Javascript code (that I've placed in <head/>):
<script language="Javascript" type="text/javascript">
function veranderAcjaar() {
var acjaar =
selecteerAcjaar.options[selecteerAcjaar.selectedIndex].value
location =
"http://student.ugent.be/astrid/bewoners.php?beginAcjaar=" + acjaar
}
</script>
What could be wrong with this code? It /seems/ right to me, but
apparently it isn't. The browser doesn't even seem to execute the
function :-s (hmm, my knowledge of Javascript doesn't seem that good :-/)
Any help would be appreciated,
greetings,
Mattias
On http://student.ugent.be/astrid/bewoners.php I got the problem that I
want Javascript to let my browser go to
http://student.ugent.be/astrid/bewoners.php?beginAcjaar=2002 when I
select 2002-03 in the form in the upper right corner (idem dito for the
other years).
My form is composed by:
<form method="post" action="bewoners.php">
<select onchange="veranderAcjaar()" name="selecteerAcjaar">
<option>2001-02</option>
<option>2002-03</option>
<option>2003-04</option>
</select>
</form>
and my Javascript code (that I've placed in <head/>):
<script language="Javascript" type="text/javascript">
function veranderAcjaar() {
var acjaar =
selecteerAcjaar.options[selecteerAcjaar.selectedIndex].value
location =
"http://student.ugent.be/astrid/bewoners.php?beginAcjaar=" + acjaar
}
</script>
What could be wrong with this code? It /seems/ right to me, but
apparently it isn't. The browser doesn't even seem to execute the
function :-s (hmm, my knowledge of Javascript doesn't seem that good :-/)
Any help would be appreciated,
greetings,
Mattias