<form name="upload" /> <li> Directorie: <select name="dir" id="selectList"> <option value="introductie" id="state">introductie</option> <option value="offertes" id="state">offertes</option> </select></li>> <li> <input type="file" name="fileInput" id="fileInput" /> </li> <li> <a href="javascript:$('#fileInput').fileUploadStart();">Upload Files</a> </li> <script type="text/javascript"> $(document).ready(function() { /*'folder' : 'documenten/' + jQuery ('select :selected').val() + '/' , */ $('#fileInput').fileUpload ({ 'uploader' : '_phpincludes/template/swf/uploader.swf', 'script' : '_phpincludes/lib/upload.php', 'cancelImg' : '_phpincludes/template/img/cancel.png', 'auto' : false, 'multi' : true, 'buttonText': 'Select bestanden', 'folder' : 'documenten/' + jQuery ('select :selected').val() + '/',
'onError': function (a, b, c, d) { if (d.status == 404) alert('Could not find upload script. Use a path relative to: '+'<?= getcwd() ?>'); else if (d.type === "HTTP") alert('error '+d.type+": "+d.status); else if (d.type ==="File Size") alert(c.name+' '+d.type+' Limit: '+Math.round(d.sizeLimit/1024)+'KB'); else alert('error '+d.type+": "+d.text); }, 'onComplete': function(a, b, c, d, e){ if (d !== '1') alert('Bestanden zijn geupload in de map ' + jQuery ('select :selected').val() + '. U word nu doorgestuurd naar de index.'); window.location = mainAdres; } }); }); </script> </form> Still doesnt help? 2009/5/28 Mauricio (Maujor) Samy Silva <css.mau...@gmail.com> > Try: > ... > var selector = $('#selectList'); > selector.change(function() { > var directory = $('option[selected]').text(); // if you want get the option > text > > or > > var directory = $('option[selected]').attr('id'); // if you want get the > option id > ... > > > -----Mensagem Original----- > *De:* Y vd Bogert <xeo...@gmail.com> > > > > In my html select code i've got the following options: > <select name="dir" id="selectList"> > <option id="introductie">introductie</option> > <option id="offertes">offertes</option> > </select> > > But when i select offertes it always shows my value as introductie? > > ... > var selector = $('#selectList'); > selector.change(function() { > var directory = selector.val(); > ... > > -- Youri v/d Bogert