[ Prev ] [ Index ] [ Next ]
This function gets called by lookupChannel(id), a function defined in the .svg maps. lookupChannel(id) passes the name of a sensor on the map to map_to_channel(selection), which then posts the channel name in the search form on the webpage and submits the search. This sends a query to the database, and returns information about the selected channel.
This function gets called in index.php every time the search form is submitted (i.e. when the user clicks one of the "Go" buttons or on a sensor on the map). It searches the svg document for an object whose "id" matches the selected channel, then identifies all the path elements of that sensor. It calls color(newElements) on those path elements every 600ms to achieve the flashing effect.
This function first stores the original colors of the path elements of a sensor, then colors them all yellow. It calls uncolor(newElements) every 300ms so that the sensor flashes yellow at 300ms intervals.
This function restores the original colors of a sensor. It is called 300ms after color(newElements) is called.
This function toggles between hiding and showing the search section of the webpage. By default the search section is shown, but when the search form is submitted, this function is called, which hides the search section and makes room for displaying the channel information. This function is called whenever the hide/show button in the top right corner of the search section is pressed.
This loads data into the right hand side of the webpage, into the section the map occupies by default. For example, when a user clicks on the LLO link, this function loads the LLO map into the map section. It can also load text into the map section, e.g. when the user clicks on "Channel Naming", "Sensor Info", or "Contact".