PDA

View Full Version : Why onchange didn't function for few variables?


peihun
08-22-2006, 12:12 PM
Hi all,

when my variables have value in "pg" or "pinpackage", onchange can function.
but when my variable have value in only "manu", onchange can't function, why?
<select name="pg" onchange="document.location='?pg='+this.value+'&manu='+'<%=manu%>'+'&pinpackage='+'<%=pinpackage%>'" class="normal">

Anyone can help me.... :'(

peihun
08-23-2006, 06:31 AM
Hihi,

i already get the answer after i tried many different ways, For information sharing:
1. variable "manu" is integer dun need to include '
2. if no data passing onchange also can't work.
correct answer:
<select name="pg" onchange="document.location='?pg='+this.value+<%if manu1<>"" then%>'&manu1='+<%=manu1%>+<%end if%>'&pinpackage='+'<%=pinpackage%>'" class="normal">

Thank for viewing....