rsadler@slco.org

Hiding/Showing DataGrid within a div tag.

Discussion created by rsadler@slco.org on Sep 23, 2011
I have two div tags ("footerDocNum" & "footerCity")  that initially is set with the (style.display: none) attribute set.  Within these div tags I have a dojo DataGrid.

I have two search options...1)search by Document Number or 2)search by City.

Each search field has a seperate "search" button associated with the code that does the proper search.  I'd like to be able to display the div tag that contains the data grid only when a user clicks on either of the search buttons.  then have the result of the search displayed in the grid for either Document Number or City.

Currently, I have everthing working, but I need to manually resize the explorer window for the div tag to appear.

The code that I'm using to toggle the visibility is:

      function showDocNumGrid(){
        //alert('DocNum');
  dojo.byId('map').style.height='80%';
  dojo.byId('footerCity').style.display = "none";
     dojo.byId('footerDocNum').style.display = "block";;  
    }
    
   function showCityGrid(){
        //alert('City');
  dojo.byId('map').style.height='80%';
  dojo.byId('footerCity').style.display = "block";
     dojo.byId('footerDocNum').style.display = "none";;
    }

Outcomes