I have the following code, whose objective is that when selecting a select option, open a colorbox with information. The select is in a pivot table and replicates. The problem is that only the url of each option works in the first row, in the following it appears: "The requested URL / undefined was not found on this server". Someone who can show me where the error is in JavaScript.
<script type="text/javascript">
$('select[name="acciones"]').change(function(){
var link = $('select[name="acciones"]').find(':selected').attr('href');
$.colorbox({iframe:true, fastIframe:false, width:"450px", height:"480px", transition:"fade", scrolling : false, href:link});
});
</script>
<select name="acciones">
<option></option>
<option href="colorbox.php">Opcion 1</option>
<option href="fechas.php">Opcion 2</option>
</select>