I need a simple mouse rollover within a JSP condition (choose).   Along with 
changing from image1 to image2 upon rollover, the code  invokes an action and 
passes a value.  The following code snippet  shows two examples within the same 
program, one presents 'analyze' with  a rollover, the second presents 
'unlimited' with a rollover
  
  The unlimited works fine, the analyze will not 'rollover'.   Both function 
properly regarding the action.
  
  I have tried every combination to see why the unlimited rollover works and 
the analyze fails.
  
  Thanks in advance,
  
  Michael  (code to follow)
  
                                    <!--   BEGIN -  Present unlimited in the 
action field if the accout number = Unlimited  -->
                                    <c:choose>
                                          <c:when test="${ml.meterAcctNbr != 
'Unlimited'}"> 
                                                 <c:choose>
                                                          <c:when 
test='${(status.count % 2) ==  0}'>                                             
                                
                                                              <td align="left"  
 style="font-size:10px;" valign="center">
                                                                   <a  
href="meterlist.do?action=addUnlimited&id=<c:out  value='${ml.cartID}'/>" 
target="_top"  onClick="MM_nbGroup('down','group1','buttonanalyze','',1)"  
onMouseOver="MM_nbGroup('over','buttonanalyze','images/buttons/analyzelist6MO.jpg','',1)"
  onMouseOut="MM_nbGroup('out')"><img  src="images/buttons/analyzelist6.jpg" 
alt="analyze"  name="buttonanalyze"  onload=""  border="0"></a>             
                                                              </td>         
                                                          </c:when>
                                                          <c:otherwise>
                                                              <td align="left"  
 style="font-size:10px;" valign="center">
                                                                  <a  
href="meterlist.do?action=addUnlimited&id=<c:out  value='${ml.cartID}'/>" 
target="_top"  onClick="MM_nbGroup('down','group1','buttonanalyze2','',1)"  
onMouseOver="MM_nbGroup('over','buttonanalyze2','images/buttons/analyzelist7MO.jpg','',1)"
  onMouseOut="MM_nbGroup('out')"><img  src="images/buttons/analyzelist7.jpg" 
alt="analyze"  name="buttonanalyze2"  onload=""  border="0"></a>                
                                            
                                                              </td>
                                                          </c:otherwise>
                                                 </c:choose>
                                          </c:when>
                                     </c:choose>    
                                
                                
                                         <!--   END - Present unlimited in the 
action field if the  accout number = Unlimited -->
                                    
                                    
                                    
                                    
                                    <!--   BEGIN -  Present analyze in the 
action field if the accout number != Unlimited  -->
                          
                                
                                    <c:choose>
                                          <c:when test="${ml.meterAcctNbr == 
'Unlimited'}"> 
                                                 <c:choose>
                                                          <c:when 
test='${(status.count % 2) ==  0}'>                                             
                                
                                                              <td align="left"  
 style="font-size:10px;" valign="center">
                                                                   <a  
href="meterlist.do?action=addUnlimited&id=<c:out  value='${ml.cartID}'/>" 
target="_top"  onClick="MM_nbGroup('down','group1','buttonu1','',1)"  
onMouseOver="MM_nbGroup('over','buttonu1','images/buttons/unlimitedlist1MO.jpg','',1)"
  onMouseOut="MM_nbGroup('out')"><img  src="images/buttons/unlimitedlist1.jpg" 
alt="unlimited"  name="buttonu1"  onload=""  border="0"></a>             
                                                              </td>         
                                                          </c:when>
                                                          <c:otherwise>
                                                              <td align="left"  
 style="font-size:10px;" valign="center">
                                                                  <a  
href="meterlist.do?action=addUnlimited&id=<c:out  value='${ml.cartID}'/>" 
target="_top"  onClick="MM_nbGroup('down','group1','buttonu2','',1)"  
onMouseOver="MM_nbGroup('over','buttonu2','images/buttons/unlimitedlist2MO.jpg','',1)"
  onMouseOut="MM_nbGroup('out')"><img  src="images/buttons/unlimitedlist2.jpg" 
alt="unlimited"  name="buttonu2"  onload=""  border="0"></a>                    
                                        
                                                              </td>
                                                          </c:otherwise>
                                                 </c:choose>
                                          </c:when>
                                     </c:choose>    
                                    <!--   END - Present  analyze in the action 
field if the accout number != Unlimited -->
  
  Javascript----------------------------------------------
          <SCRIPT TYPE="text/javascript">
          <!--
          // copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
          // Distribute this script freely, but keep this 
          // notice with the code.
  
          
          var submitRolls = new Object();
          
          function submitroll(src, oversrc, name)
          {
          this.src=src;
          this.oversrc=oversrc;
          this.name=name;
          this.alt="cancel";
          this.write=submitroll_write;
          }
          
          function submitroll_write()
          {
          var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
          submitRolls[this.name] = new Object();
          submitRolls[this.name].over = new Image();
          submitRolls[this.name].over.src = this.oversrc;
          submitRolls[this.name].out = new Image();
          submitRolls[this.name].out.src = this.src;
          
          document.write
              (
              '<A  onMouseOver="if (document.images)document.images[\'' + 
this.name +  "'].src=submitRolls['" + this.name + '\'].over.src"' + 
              '  onMouseOut="if (document.images)document.images[\'' + 
this.name +  "'].src=submitRolls['" + this.name + '\'].out.src"' + 
              ' HREF="javascript:'
              );
          
          if (this.sendfield)
              {
              if (! this.sendvalue)
                  this.sendvalue = 1;
               document.write(thisform, ".elements['", this.sendfield, 
"'].value='",  this.sendvalue, "';");
              }
          
          document.write(thisform + '.submit();void(0);"');
          if (this.msg)document.write(' onClick="return confirm(\'' , this.msg, 
'\')"');
          document.write('>');
          
          document.write('<IMG SRC="' +  this.src + '" ALT="' + this.alt + '" 
BORDER=0 NAME="' + this.name +  '"');
          if (this.height)document.write(' HEIGHT=' + this.height);
          if (this.width)document.write(' WIDTH='  + this.width);
          if (this.otheratts)document.write(' ' + this.otheratts);
          document.write('></A>');
          if (this.sendfield)
              {
               document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield +  
'">');
               document.forms[document.forms.length -  
1].elements[this.sendfield].value='';
              }
          }
          
          //-->
          </SCRIPT>
          
          <script language="JavaScript" type="text/JavaScript">
                  <!--
                  function MM_preloadImages() { //v3.0
                     var d=document; if(d.images){ if(!d.MM_p)  d.MM_p=new 
Array();
                       var  i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
for(i=0; i<a.length;  i++)
                       if (a[i].indexOf("#")!=0){  d.MM_p[j]=new Image; 
d.MM_p[j++].src=a[i];}}
                  }
                  
                  function MM_findObj(n, d) { //v4.01
                     var p,i,x;  if(!d) d=document;  
if((p=n.indexOf("?"))>0&&parent.frames.length) {
                        d=parent.frames[n.substring(p+1)].document; 
n=n.substring(0,p);}
                     if(!(x=d[n])&&d.all) x=d.all[n]; for  
(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
                      for(i=0;!x&&d.layers&&i<d.layers.length;i++)  
x=MM_findObj(n,d.layers[i].document);
                     if(!x && d.getElementById)  x=d.getElementById(n); return 
x;
                  }
                  
                  function MM_nbGroup(event, grpName) { //v6.0
                    var i,img,nbArr,args=MM_nbGroup.arguments;
                     if (event == "init" && args.length  > 2) {
                       if ((img = MM_findObj(args[2]))  != null && 
!img.MM_init) {
                         img.MM_init = true;  img.MM_up = args[3]; img.MM_dn = 
img.src;
                         if ((nbArr =  document[grpName]) == null) nbArr = 
document[grpName] = new Array();
                         nbArr[nbArr.length] =  img;
                         for (i=4; i <  args.length-1; i+=2) if ((img = 
MM_findObj(args[i])) != null) {
                           if  (!img.MM_up) img.MM_up = img.src;
                           img.src =  img.MM_dn = args[i+1];
                            nbArr[nbArr.length] = img;
                      } }
                    } else if (event == "over") {
                       document.MM_nbOver = nbArr = new  Array();
                       for (i=1; i < args.length-1;  i+=3) if ((img = 
MM_findObj(args[i])) != null) {
                         if (!img.MM_up)  img.MM_up = img.src;
                         img.src = (img.MM_dn  && args[i+2]) ? args[i+2] : 
((args[i+1])? args[i+1] :  img.MM_up);
                         nbArr[nbArr.length] =  img;
                      }
                    } else if (event == "out" ) {
                       for (i=0; i <  document.MM_nbOver.length; i++) {
                         img =  document.MM_nbOver[i]; img.src = (img.MM_dn) ? 
img.MM_dn : img.MM_up; }
                    } else if (event == "down") {
                      nbArr = document[grpName];
                      if (nbArr)
                         for (i=0; i <  nbArr.length; i++) { img=nbArr[i]; 
img.src = img.MM_up; img.MM_dn = 0; }
                       document[grpName] = nbArr = new  Array();
                       for (i=2; i < args.length-1;  i+=2) if ((img = 
MM_findObj(args[i])) != null) {
                         if (!img.MM_up)  img.MM_up = img.src;
                         img.src = img.MM_dn =  (args[i+1])? args[i+1] : 
img.MM_up;
                         nbArr[nbArr.length] =  img;
                    } }
                  }
                  //-->
  </script>
  
  


Immerman and Associates LLC
www.immermanassociates.com
[EMAIL PROTECTED]


Reply via email to