Hi all,

        I have a non-ajax button that I want to disable when my 'ajax'
autocompleter(s) change values.  (I DIDN'T go with the 'ajax' submit
button because it doesn't work with IE 6)   How would I do this?  Is
this even possible?   CODE SNIPPET below:



        
        <script type="text/javascript">
                                  function fireevent()
                              {                 
        
dojo.event.topic.publish("/countryChanged");                            
                              } 

                              function fireservingareachanged()
                              {
        
dojo.event.topic.publish("/servingareaChanged");
                              }

                              
                              function firetrafficchanged()
                              {
        
dojo.event.topic.publish("/trafficChanged");
                              }
                                                      
                              function fireCarrierchanged()
                              {
        
dojo.event.topic.publish("/carrierChanged");
                              }
                              
                              function fireSwitchchanged()
                              {
        
dojo.event.topic.publish("/switchChanged");
                              }
                              
                              function firetrunkchanged()
                              {
        
dojo.event.topic.publish("/switchChanged");
                              }         
        </script>

     
         <script type="text/javascript">
                                dojo.require("dojo.widget.*");
                                dojo.require("dojo.widget.ComboBox");   
        

                                
                                function init()
                              {
        
dojo.widget.byId("destinationCountry").dataProvider.searchLimit = 400;
        
dojo.widget.byId("servingArea").dataProvider.searchLimit = 400;

        
dojo.widget.byId("traffic").dataProvider.searchLimit = 400;
        
dojo.widget.byId("carrier").dataProvider.searchLimit = 400;
        
dojo.widget.byId("switch").dataProvider.searchLimit = 400;

        
dojo.widget.byId("trunk").dataProvider.searchLimit = 400;       
                                
        
dojo.event.connect(dojo.widget.byId("startDateId"), "onValueChanged" , 
        
"fireservingareachanged"); 
        
dojo.event.connect(dojo.widget.byId("endDateId"), "onValueChanged" , 
        
"fireservingareachanged");      
        
dojo.event.connect(dojo.widget.byId("servingArea"), "onValueChanged" , 
        
"fireservingareachanged");

        
dojo.event.connect(dojo.widget.byId("destinationCountry"),
"onValueChanged" , 
        
"fireevent");   
        
dojo.event.connect(dojo.widget.byId("traffic"), "onValueChanged" , 
        
"firetrafficchanged");                                  
        
dojo.event.connect(dojo.widget.byId("carrier"), "onValueChanged" , 
        
"fireCarrierchanged");

        
dojo.event.connect(dojo.widget.byId("switch"), "onValueChanged" , 
        
"fireSwitchchanged");

                                                                
                              }
                                
                              dojo.addOnLoad(init);     

<script>


<s:url id="getTrunk" includeParams="all"
action="CityCountryLevelQueryAction" method="getTrunkForForm"/>

                                <s:autocompleter href="%{getTrunk}" 
                                        id="trunk" 
                                        name="trunk"
                                   keyName="trunkKey"
autoComplete="false"
                                   theme="ajax" 
                                   label="Trunk"
                                   emptyOption="true"
                                 formId="cityCountryLevelForm"
                                 indicator="indicatortrunk"
listenTopics="/trafficChanged,/switchChanged,/carrierChanged,/countryCha
nged" 
                                                forceValidOption="true" 
                                                cssStyle="width:
250px"/>   
                                                <img id="indicatortrunk"
src="images/indicator.gif" alt="Loading..." style="display:none"/>  
                                                                </td>

                                                         </tr>

                                </table>
                        </td>

                </tr>
        </table>

        <table>
                
                <tr>
                                <td>
                                        &nbsp;
                                </td>
                </tr>
                <tr>
                  <td colspan="4">
                   <img id="submitindicator" src="images/indicator.gif"
alt="Loading..." style="display:none"/>  
            <s:url id="submitquery" includeParams="all"  
                action="CityCountryLevelQueryAction"
method="submitQueryResult"/>                                     
                   
                    <s:submit type="button" id="query"
href="%{submitquery}"
                                  label="submit"  targets="tableresults"

                                  formId="cityCountryLevelForm"
                                  indicator="submitindicator" />
                                


Thanks,

Leon

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to