ramli
05-03-2007, 01:30 PM
I want to display the value of hcatagorie in the header when it refreshes. However i keep gettin a undifened error.
<select name="hcatagorie" class="select"
onchange="window.location='?id=vraag&hcatagorie='
+document.vraag.hcatagorie.value">
can anybody help me with this thx in advance
If the page does not have to be refreshed then you could go
<select name="hcatagorie" class="select" onchange="document.getElementById('header').innerHTML=document.vraag.hcatagorie.value">
otherwise something like this maybe
<HTML>
<HEAD>
<TITLE>Document Title</TITLE>
<script type="text/javascript">
onload=function test(){
if (location.search.length > 0){
dataPassed = unescape(location.search.substring(1))
document.getElementById("header").innerHTML=dataPassed.split("&")[1].split("=")[1]
}
}
</script>
</HEAD>
<BODY>
<div id="header"></div>
<form name="vraag">
<select name="hcatagorie" class="select" onchange="window.location='?id=vraag&hcatagorie='+document.vraag.hcatagorie.value">
<option value="0">0
<option value="1">1
<option value="2">2
<option value="3">3
</select>
</form>
</BODY>
</HTML>
ramli
05-03-2007, 02:08 PM
Thx that worked :thumbsup: