# Javascript DOM selecting HELP

**URL:** <https://forum.kirupa.com/t/javascript-dom-selecting-help/328918>\
**Category:** web dev\
**Created:** [July 2, 2012, 9:49pm UTC](https://forum.kirupa.com/t/javascript-dom-selecting-help/328918 "2012-07-02T21:49:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saucey](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@saucey](https://forum.kirupa.com/u/saucey)\
**Post date:** [July 2, 2012, 9:49pm UTC](https://forum.kirupa.com/t/javascript-dom-selecting-help/328918/1 "2012-07-02T21:49:44Z")

</div>

I have this code placed below, can some explain were i am going wrong its not alerting me with any values when my form seletion gets processed.

```auto
function validateForm()
{
var e = document.getElementById("carsel");
var btn = e.options[selectedIndex].value;

if (btn == null) alert('No radio button selected');
else alert('Button value ' + btn + ' selected'); 
  return false;
  }

```
