W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2009

2006/unicorn/WebContent/scripts w3c_unicorn_results.js,1.12,1.13 w3c_unicorn_index.js,1.11,1.12

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 30 Sep 2009 16:29:19 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mt23L-00024g-Gv@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/scripts
In directory hutz:/tmp/cvs-serv7876/WebContent/scripts

Modified Files:
	w3c_unicorn_results.js w3c_unicorn_index.js 
Log Message:
fixed function setHash. On some browsers window.location.hash = '' makes the page reload.

Index: w3c_unicorn_results.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_results.js,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- w3c_unicorn_results.js	29 Sep 2009 09:53:48 -0000	1.12
+++ w3c_unicorn_results.js	30 Sep 2009 16:29:17 -0000	1.13
@@ -229,7 +229,7 @@
 			W3C.FakeForm = W3C.FakeForm || new Element('form', {'method': 'get'}).injectInside(document.body);
 			W3C.FakeForm.setProperty('action', '#' + hash).submit();
 		} else {
-			window.location.hash = hash;
+			window.location.hash = '#' + hash;
 		}
 	}
 };

Index: w3c_unicorn_index.js
===================================================================
RCS file: /sources/public/2006/unicorn/WebContent/scripts/w3c_unicorn_index.js,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- w3c_unicorn_index.js	30 Sep 2009 09:32:00 -0000	1.11
+++ w3c_unicorn_index.js	30 Sep 2009 16:29:17 -0000	1.12
@@ -340,7 +340,7 @@
 			W3C.FakeForm = W3C.FakeForm || new Element('form', {'method': 'get'}).injectInside(document.body);
 			W3C.FakeForm.setProperty('action', '#' + hash).submit();
 		} else {
-			window.location.hash = hash;
+			window.location.hash = '#' + hash;
 		}
 	}
 	
Received on Wednesday, 30 September 2009 16:29:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:14 GMT