]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.rhtml
Hiding the element and then, shortly after, redisplaying it makes IE6 re-render
[rails.git] / app / views / site / index.rhtml
index 86dbb9e70d70f0deaf2b9d6ccd732776730f4c67..d540836d7cdec0a27c16fe5788a0175247c8b629 100644 (file)
@@ -2,21 +2,20 @@
 
 <div id="geocoder">
   <%= start_form_tag :controller => 'geocoder', :action => 'search' %>
-  <%= text_field 'query', 'postcode'%>
+  <%= text_field 'query', 'postcode' %>
   <%= text_field 'query', 'place_name'%>
   <%= submit_tag 'Search' %>
   <%= end_form_tag %>
 
   <div id="geocoder-attribution">
     Geolocation provided by <a href="http://npemap.org.uk/">npemap.org.uk</a>,
-    <a href="http://geocoder.us/">geocoder.us</a>, <a href="http://geocoder.ca/">geocoder.ca</a>
-    and <a href="http://www.geonames.org/">geonames.org</a>
+    <a href="http://geocoder.us/">geocoder.us</a>, <a href="http://geocoder.ca/">geocoder.ca</a> and <a href="http://www.geonames.org/">geonames.org</a>
   </div>
   <div id="postcode-helper">
-    eg: SW15 6JH, 95472 or H2L4C1
+    Enter a postcode or zip code, eg: SW15 6JH, 95472 
   </div>
   <div id="placename-helper">
-    eg:Essen
+    Enter a place-name, eg:Essen
   </div>
 </div>
 
     var el = document.getElementById( 'map' );
     var left = getStyle( el, 'left' );
     var top = getStyle( el, 'top' );
-    var bottom = el.old_bottom;
-    if( ! bottom ) {
-      bottom = getStyle( el, 'bottom' );
-    }
-    var right = el.old_right;
-    if( ! right ) {
-        right = getStyle( el, 'right' );
-    }
+    var bottom = getStyle( el, 'bottom' );
+    var right = getStyle( el, 'right' );
     var width = el.old_width;
     if( ! width ) {
         width = getStyle( el, 'width' );
     }
     if( top != 'auto' && bottom != 'auto' && height == 'auto' ) {
       el.old_height = height;
-      var new_height = (pheight - el.offsetHeight - parseInt( bottom ) );
+      var new_height = (pheight - el.offsetTop - parseInt( bottom ) );
       el.style.height = new_height + 'px';
     }
+    map.updateSize();
+    el.style.display = 'none';
+    setTimeout( function() {
+        el.style.display = '';
+        }, 200 );
   }
 
 if( ie6 ) {