favc4
Posts: 30
|
| Posted: 06/20/2006, 1:14 AM |
|
Hi again! I made this cheesy function to respond to an onchange event in one form's listbox control
//page_rcCallDetail_IdResultadoLlamada_OnChange @10-372E206E
function page_rcCallDetail_IdResultadoLlamada_OnChange()
{
var IdRLL = document.forms["rcCallDetail"].IdResultadoLlamada.Value;
var result = null;
alert("Variable='IdRLL' value="+IdRLL)
switch (IdRLL)
{
case 1: result = 2; break;
case 2: showDatePicker('rcCallDetail_DatePicker_hFechaProximoContacto1','rcCallDetail','hFechaProximoContacto'); result="Pasaba x aki";
default: result = 'unknown';
}
//End page_rcCallDetail_IdResultadoLlamada_OnChange
//Close page_rcCallDetail_IdResultadoLlamada_OnChange @10-BC33A33A
return result;
}
//End Close page_rcCallDetail_IdResultadoLlamada_OnChange
The issue is that var IdRLL is getting undefined; this is supposed to get the control current value, isnt so?
_________________
Programming win32 and went crazy... |
 |
 |
Edd
Posts: 547
|
| Posted: 06/20/2006, 5:04 AM |
|
I think the syntax for getting a value of a listbox is:
var IdRLL = document.forms["rcCallDetail"].[[document.forms["rcCallDetail"].selectedIndex].value;
You need the index of the selected item in the listbox first.
Hope this helps
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
|