I have this code (an example that PHP generates for me)…
<select id="outsideBlue3">
<option id="bgImg" value="4f6e2288e3ddsa.zip">4f6e216857a0d.zip</option>
<option id="bgImg" value="4f6e2288e22dda.zip">4f6e2188a39a2.zip</option>
<option id="bgImg" value="4f6e2288e3dda.zip">access-denied.php.zip</option>
<option id="bgImg" value="4f80b747ab81c.jpg">UntitledDocument.jpg</option>
</select>
The string inside the option tags is the name of the file that was uploaded. The value is the name that the file is on the server.
I have tried to use $("#outsideBlue3").val() and I have tried $("#outsideBlue3").attr("value") but it returns nothing. The first one I tried works when I remove the value tags, but then I get the string inside the option tags. I want the value tag’s contents.
Thanks!
This should do it