javascript error investigation