Get Default Value From select field Javascript
I have a select field that have have present options and I have a php script check a mysql database and add a select tag to the one currently being used. I need to find a way to know if the user have changed the select field or not before submitting it. var Access = document.forms[UIDF]["Access"].value; var DAccess = document.forms[UIDF]["Access"].defaultIndex; <--- This is my problem. I just need to know how to get the selected option value as this keep changing with every user <select name="Access"> <option value="0" selected='selected'>Employee</option> <option value="1">Team Leader</option