From: Joey Schulze Date: Sat, 19 Jan 2013 20:11:03 +0000 (+0100) Subject: Select preis if date is available already X-Git-Url: https://git.infodrom.org/?p=misc%2Fhallinta-metro;a=commitdiff_plain;h=426d764b067beb6e5ab2b29aaeeb761fb36cba39 Select preis if date is available already --- diff --git a/artikel.php b/artikel.php index d18a219..e26008d 100644 --- a/artikel.php +++ b/artikel.php @@ -50,7 +50,11 @@ function price_popup_open() artikel.value = form_id.value; var datum = document.getElementById('form_datum'); - datum.activate(); + var preis = document.getElementById('form_preis'); + if (datum.value.length) + preis.activate(); + else + datum.activate(); } function open_popup()