Question: i'm using VirtualBox 5.0.20 under Win 7, guest is centOS 7.1 with virtualbox additions 5.0.16. 

Problem is: When changing any .js-File in my IDE (or windows editor etc.), the content served by the httpd/apache Webserver gets messed up with undisplayable chars and parts of the file-content are cut off.

This started happening when upgrading virtualbox and the additions to the latest version and ONLY happens on .js files.

Remounting the shared folder in the linux guest fixes the prob until the next change to the file-contents.

Does anybody have the same/similar problem and a workaround for it ?

Thx !

Answer: 
In selects you need not worry about options. The select `value` can be extracted from `select` attribute itself You could try something like this:

```
function searchSelectOptions(){

var opts = [];
$('YOUR-SELECT-CLASS').each(function(){
    if($(this).val()!=='' || typeof $(this).val()!=='undefined'){
       opts.push(this.val());
    }
    });
return opts;

};

```

**EDIT** If you've defined your options and their values doesn't have empty string (Which is the case after OP edit). You could just do: 

```
function searchSelectOptions(){

var opts = [];
$('YOUR-SELECT-CLASS').each(function(){
   opts.push(this.val());
});
return opts;

};

```
If the default selected option is always the first one, you can check using:

```
if(this.selectedIndex != 0)

```

Where `this` refers to `select` element.

[-jsFiddle-
----------](https://jsfiddle.net/oj14xL4b/)