<select tabindex="10" accesskey="i" id="menu_fromtimestamp" name="menu_fromtimestamp">
<option>* Select Month From</option>
<option value="2011-08-01 00:00:00">1st August 2011, 00:00:00</option>
<option value="2011-09-01 00:00:00">1st September 2011, 00:00:00</option>
<option value="2011-10-01 00:00:00">1st October 2011, 00:00:00</option>
<option value="2011-11-01 00:00:00">1st November 2011, 00:00:00</option>
</select>
<select tabindex="11" accesskey="m" id="menu_totimestamp" name="menu_totimestamp">
<option>* Select Month To</option>
<option value="2011-11-30 23:59:59">30th November 2011, 23:59:59</option>
<option value="2011-10-31 23:59:59">31st October 2011, 23:59:59</option>
<option value="2011-09-30 23:59:59">30th September 2011, 23:59:59</option>
<option value="2011-08-31 23:59:59">31st August 2011, 23:59:59</option>
</select>
onchange functions for these two elements:document.form_transactions.menu_fromtimestamp.onchange = function () {
var fi = document.form_transactions.menu_fromtimestamp.selectedIndex;
var ti = document.form_transactions.menu_totimestamp.selectedIndex;
var from = document.form_transactions.menu_fromtimestamp.options[fi].value;
var till = document.form_transactions.menu_totimestamp.options[ti].value;
var fm = document.form_transactions.menu_fromtimestamp.options[fi].text.split(" ")[1];
var tm = document.form_transactions.menu_totimestamp.options[ti].text.split(" ")[1];
var fd = new Date(
fm + " " + // month
from.split("-")[2] + ", " + // dd,
from.split("-")[0] // yyyy
);
var td = new Date(
tm + " " + // month
till.split("-")[2] + ", " + // dd,
till.split("-")[0] // yyyy
);
if (td > fd) {
return ajaxRequest(document.form_transactions.button_refresh);
} else {
alert("The TO date must be after the FROM date!"); return false;
}
}
document.form_transactions.menu_totimestamp.onchange = function () {
var fi = document.form_transactions.menu_fromtimestamp.selectedIndex;
var ti = document.form_transactions.menu_totimestamp.selectedIndex;
var from = document.form_transactions.menu_fromtimestamp.options[fi].value;
var till = document.form_transactions.menu_totimestamp.options[ti].value;
var fm = document.form_transactions.menu_fromtimestamp.options[fi].text.split(" ")[1];
var tm = document.form_transactions.menu_totimestamp.options[ti].text.split(" ")[1];
var fd = new Date(
fm + " " + // month
from.split("-")[2] + ", " + // dd,
from.split("-")[0] // yyyy
);
var td = new Date(
tm + " " + // month
till.split("-")[2] + ", " + // dd,
till.split("-")[0] // yyyy
);
if (td > fd) {
return ajaxRequest(document.form_transactions.button_refresh);
} else {
alert("The TO date must be after the FROM date!"); return false;
}
}
now when selecting From 1st October, in firefox it works no problem no matter the version.Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE