Changeset 12135


Ignore:
Timestamp:
2006-07-11T13:42:50+12:00 (18 years ago)
Author:
mdewsnip
Message:

Moved the region options out of _cicstateoptions_, since they are configured differently for the "search institutions by state" and "advanced search" pages. Also changed the "stq" form element to "stc", and filled in the prepareStateSearch function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cic-hcap/macros/extra.dm

    r12133 r12135  
    913913function prepareStateSearch()
    914914\{
     915   var stq_value = "";
     916   for (var i = 0; i < document.StateQueryForm.stc.options.length; i++) \{
     917      if (document.StateQueryForm.stc.options[i].selected == true) \{
     918         if (stq_value != "") stq_value += ",";
     919         stq_value += document.StateQueryForm.stc.options[i].value;
     920      \}
     921   \}
     922   document.StateQueryForm.stq.value = stq_value;
    915923\}
    916924
    917925function selectRegion(region)
    918926\{
    919    for (var i = 0; i < document.StateQueryForm.stq.options.length; i++) \{
    920       if (document.StateQueryForm.stq.options[i].value == region) \{
    921          document.StateQueryForm.stq.options[i].selected = true;
     927   for (var i = 0; i < document.StateQueryForm.stc.options.length; i++) \{
     928      if (document.StateQueryForm.stc.options[i].text == region) \{
     929         document.StateQueryForm.stc.options[i].selected = true;
    922930     break;
    923931      \}
     
    952960    <input type="hidden" name="qst" value="1">
    953961    <input type="hidden" name="qrst" value="1">
    954         <select name="stq" size="25" multiple="true" style="width: 125px;">
     962    <input type="hidden" name="stq" value="">
     963        <select name="stc" size="25" multiple="true" style="width: 125px;">
     964      <option value="Northeast">Northeast</option>
     965      <option value="Southeast">Southeast</option>
     966      <option value="Midwest">Midwest</option>
     967      <option value="Southwest">Southwest</option>
     968      <option value="Mountain">Mountain</option>
     969      <option value="West">West</option>
    955970          _cicstateoptions_
    956971        </select>
     
    973988# Shared between the "search institutions by state" and "advanced search" pages
    974989_cicstateoptions_ {
    975   <option value="Northeast">Northeast</option>
    976   <option value="Southeast">Southeast</option>
    977   <option value="Midwest">Midwest</option>
    978   <option value="Southwest">Southwest</option>
    979   <option value="Mountain">Mountain</option>
    980   <option value="West">West</option>
    981990  <option value="AL">Alabama</option>
    982991  <option value="AK">Alaska</option>
     
    12921301  <td valign="top">
    12931302    <select name="stq" onChange="prepareadvancedsearch();" size="10" multiple="true" style="width: 225px;">
     1303      <option value="Northeast">Northeast</option>
     1304      <option value="Southeast">Southeast</option>
     1305      <option value="Midwest">Midwest</option>
     1306      <option value="Southwest">Southwest</option>
     1307      <option value="Mountain">Mountain</option>
     1308      <option value="West">West</option>
    12941309      _cicstateoptions_
    12951310    </select>
Note: See TracChangeset for help on using the changeset viewer.