[thelist] Javascript "this" Question

josh evolt at efeingold.com
Fri Dec 21 12:15:20 CST 2001


I am trying to create a JavaScript which can tell which (if any) select box 
was changed: 

e.g. 

<select name=78 onChange=hidden()>
<option value='One'>One
<option value='Two'>Two
</select> 

<select name=79 onChange=hidden()>
<option value='One'>One
<option value='Two'>Two
</select> 

I know I have seen something like this: 

<script language=JavaScript>
function hidden() {
values = this.value
}
</script> 

However, I can't find any information when I search Google for "this," as 
you can imagine. 

So I have two questions:  1) What exactly is "this?"  2) And how do I use 
it? (Not to be confusted with "IT.") 

Thanks,
Josh 






More information about the thelist mailing list