[Mapbender-commits] r7702 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Mar 13 06:52:40 EDT 2011


Author: christoph
Date: 2011-03-13 03:52:40 -0700 (Sun, 13 Mar 2011)
New Revision: 7702

Modified:
   trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
avoid "wfsWindow.document is null"

related to #799

Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php	2011-03-13 10:42:49 UTC (rev 7701)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php	2011-03-13 10:52:40 UTC (rev 7702)
@@ -2885,10 +2885,13 @@
 		}
 		
 		// Extract the current, possibly new WfsConf
-		var newWfsConfId = parseInt(wfsWindow.document.getElementById('wfs').wfs.value);
-		var newWfsConf = wfsConf[newWfsConfId]; 
+                var newWfsConfId = d.get(m).wfs_conf
+		if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
+                    newWfsConfId = parseInt(wfsWindow.document.getElementById('wfs').wfs.value, 10);
+		}
+		var newWfsConf = wfsConf[newWfsConfId];
 		newWfsConfId = newWfsConf['wfs_conf_id'];
-		
+
 		// Check each feature attribute if it is part of the WfsConf element type. If not, delete.
 		var e = d.get(m).e;
 		var elementsToDelete = [];



More information about the Mapbender_commits mailing list