/* * Fix for error searching date-range when search-criteria holds the field "name" * form.name then refers to the element instaed of the form property "name" */function onchangeDate(field){ var value = getSelectedOptionValue(field); var context=field.name if (value == 'range') { var objectId=this["$parentId"] if(!objectId || objectId == "null") objectId=this["$objectId"] var url = 'dispatch?datasource=search&operation=dateRangeDialog&callback=rangeCallback&context='+context+'&formName='+$formName+'&decorate=false&storeUrl=false&timezone=' + this['$timezone'] + '&returnUrl=' + this['$thisUrl'] + '&parentId=' + this['$parentId']; openWindow(url, "dateRangeWnd", 300, 200) }}