Eric Rohloff wrote:Your probably looking for
jQ("select[name=mydropdownname]").val('');
Thanks Eric.
For some reason the Date Now() is returning 11 for the month instead of 12. Any idea why? Also I've tried to combine the value from a datepicker element but every time I added it to the change function the script would not run. I've also uploaded the example to sdrive to test; same results.
Here is what I have done:
<script src="common/libs_js/jquery-1.4.4.min.js"></script> <script type="text/javascript">var jQ = $.noConflict(true);
jQ(document).ready(function()
{
jQ("input[name=FormID]").attr("readonly", true);
jQ("select[name=State], select[name=City], select[name=Street]").change(function()
{
var State = jQ("select[name=State]").val();
var City = jQ("select[name=City]").val();
var Street = jQ("select[name=Street]").val();
var d = new Date(Date.now());
var curr_date = d.getDate();
var curr_month = d.getMonth();
var curr_year = d.getFullYear();
{jQ("input[name=FormID]").val(State+City+Street+curr_date+curr_month+curr_year);
}
});
});</script>