Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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
Download (untitled) / with headers
text/plain 580b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.