summaryrefslogtreecommitdiffstats
path: root/phpfspot.js
diff options
context:
space:
mode:
Diffstat (limited to 'phpfspot.js')
-rw-r--r--phpfspot.js21
1 files changed, 18 insertions, 3 deletions
diff --git a/phpfspot.js b/phpfspot.js
index f705e88..706d642 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -534,8 +534,23 @@ function hidePhotoDetails(mode)
*/
function showCalendar(date_box, click_obj)
{
- var calendar = document.getElementById('calendar');
- var userdate = document.getElementById('date_' + date_box).value;
+ var calendar;
+ var userdate;
+
+ calendar = document.getElementById('calendar');
+ if(calendar == undefined) {
+ window.alert("Can not find element 'calendar'");
+ return;
+ }
+
+ userdate = document.getElementById('date_' + date_box);
+
+ if(userdate == undefined) {
+ window.alert("Can not find element 'date_'" + date_box);
+ return;
+ }
+
+ userdate = userdate.value;
if(date_box == 'from') {
var xpos = document.getElementById('frompic').offsetLeft;
@@ -548,7 +563,7 @@ function showCalendar(date_box, click_obj)
calendar_mode = 'to';
}
calendar.style.left = xpos + 100 + 'px';
- calendar.style.top = ypos + 80 + 'px';
+ calendar.style.top = ypos + 120 + 'px';
if(calendar.style.visibility == "" || calendar.style.visibility == 'hidden') {
calendar.style.visibility = 'visible';