views:

139

answers:

1

Is there anybody that can help me please? sorry my english...

this is the php code that generate the error (only on Internet explorer 8, on firefox, opera and chrome working good):

<!--    SHIPPING ADDRESS   -->
         <h4 id='onCheckoutShipping'><?php echo JText::_("Indirizzo di spedizione") ?></h4>
         <?php
         $baseurl = "index.php?option=com_tienda&format=raw&controller=addresses&task=getAddress&address_id=";
         $url = JRoute::_($baseurl . @$this->shipping_address->address_id);
            if (!empty($this->addresses))
            {
             $shipattribs = array('class' => 'inputbox',    'size' => '1','onchange' => "tiendaDoTask('$baseurl'+this.options[this.selectedIndex].value, 'shippingDefaultAddress', '')");
             echo TiendaSelect::address( JFactory::getUser()->id, @$this->shipping_address->address_id, 'shipping_address_id', 2, $shipattribs, 'shipping_address_id', false );
             if(count($this->addresses) == 1){
              echo "<input type=\"hidden\" id=\"shipping_address_id\" name=\"shipping_address_id\" value=\"" . @$this->shipping_address->address_id . "\" />";
             }
}?>

            <script type="text/javascript">tiendaDoTask('<?php echo $url ?>', 'shippingDefaultAddress', '');</script>

         <p id="shippingDefaultAddress"></p>

        </td>
        <td style="width: 50px; text-align: left;">
            <!--    BILLING ADDRESS   -->             
         <h4 id='onCheckoutBilling'><?php echo JText::_("Indirizzo di fatturazione") ?></h4>
         <?php 
             $url = JRoute::_($baseurl . @$this->billing_address->address_id);
             if (!empty($this->addresses))
             {
                 $billattribs = array('class' => 'inputbox',    'size' => '1','onchange' => "tiendaDoTask('$baseurl'+this.options[this.selectedIndex].value, 'billingDefaultAddress', '')");
                 echo TiendaSelect::address( JFactory::getUser()->id, @$this->billing_address->address_id, 'billing_address_id', 1, $billattribs, 'billing_address_id', false );
              if(count($this->addresses) == 1)
              {
                echo "<input type=\"hidden\" id=\"billing_address_id\" name=\"billing_address_id\" value=\"" . @$this->billing_address->address_id . "\" />";
              }
 }?>
         <script type="text/javascript">tiendaDoTask('<?php echo $url ?>', 'billingDefaultAddress', '');</script>
         <p id="billingDefaultAddress"></p>
        </td>
    </tr>
    </table>        
A: 

Try putting the last script block after you close the Your tiendaDoTast() probably tries to modify this Tag and IE has problems with modified unclosed Tags.

You could also put span's there instead of putting the script right in the flow and access them at the end of the script.

KTB