Skip Menu |

This queue is for tickets about the CGI-Ajax CPAN distribution.

Report information
The Basics
Id: 19893
Status: new
Priority: 0/
Queue: CGI-Ajax

People
Owner: Nobody in particular
Requestors: STEFFENW [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.695
Fixed in: (no value)



Subject: get selection from single select list
function getVal(id) { if (id.constructor == Function ) { return id(); } if (typeof(id)!= 'string') { return id; } var element = document.getElementById(id) || document.forms[0].elements[id]; if(!element){ alert('ERROR: Cant find HTML element with id or name: ' + id+'. Check that an element with name or id='+id+' exists'); return 0; } if(element.type == 'select-one') { return element[element.selectedIndex].value } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ in case of: nothing selected Error: element[element.selectedIndex] has no properties