Javascript / Joomla模块在FF,/ Chrome / Safari中工作,而不是在IE中

时间:2013-03-25 16:00:27

标签: javascript internet-explorer joomla donations

好的,这就是问题。

我们为Joomla创建了一些模块,其中包含一些Javavascript,但我们现在发现,这些脚本在FF / Chrome / Safari中工作,但在IE中却没有。

这是网站http://www.doneereenwaterput.nl

这是最正确的模块(Lopende waterput projecten),有一个名为“Doneer”的按钮。它必须转到特定的CampaignID,但该按钮在IE中不起作用。我们对中间右侧的模块(Totaalstand)使用相同的代码,其中“Doneer”按钮也不起作用。

以下是代码:

    <?php
    defined('_JEXEC') or die ( 'Restricted access');        
?>
<?php
    if ($config->fix_next_button) {
    ?>
        <form name="top_campaign_form" id="campaign_form" method="post" action="<?php echo $url;?>index.php?Itemid=<?php echo $itemId; ?>"> 
    <?php    
    } else {
    ?>
        <form name="top_campaign_form" id="campaign_form" method="post" action="<?php echo $url;?>index.php">
    <?php   
    }
?>
<table width="100%">
<?php       
    $tabs = array('sectiontableentry1', 'sectiontableentry2');
    $k = 0 ;
    for ($i = 0 , $n = count($rows) ; $i < $n ; $i++) {
        $row = $rows[$i] ;
        $tab = $tabs[$k] ;
        $k =  1 - $k ;
    ?>          
    <tr class="<?php echo $tab; ?>">
        <td>
            <table width="100%" cellspacing="2" cellpadding="2" class="campaign_table_list">
                <?php                                                               
                    if ($showTitle) {
                    ?>
                        <tr>                                    
                            <td colspan="2" width="50%">
                                <h4 align="left"><?php echo (strlen(trim($row->title)) > 15 ? substr(trim($row->title), 0 , 13).'...' : trim($row->title) ); ?></h4>
                            </td>
                            <?php if ($showDonatedAmountToday) { 
                                  $donatedAmountToday = JdTopCampaignsHelper::getTodayDonation($row->id);
//                                var_dump($donatedAmountToday);exit;
                                  $goal = $row->goal;
                                  $percentAmountToday = ($donatedAmountToday ? ceil((($donatedAmountToday)/$goal)*100) : 0); 
                              ?>
                              <td rowspan="3" width="50%"><div style="height:74px; width:74px;background:#A7B440;font-size:30px;position: relative;bottom:-11px;right:-4px;text-align: center;color:#ffffff;"><?php echo $percentAmountToday?>%<span style="float: left;font-size:14px;line-height: 15px;position: relative;top: -8px;">groei vandaag</span></div></td>
                            <?php } ?>
                        </tr>
                    <?php       
                    }
                    if ($showDonatedAmount) {
                    ?>
                        <tr>
                            <td width="70%">
                                <span style="font-size:12px;"><?php echo JText::_('mijn put is op '); ?></span>
                            </td>
                            <td width="30%">
                                <?//php echo $currencySymbol.number_format($row->donated_amount, 2); JD_TOP_CAMPAIGN_DONATED_AMOUNT ?>
                                <?php 
                                      $donatedAmount = $row->donated_amount;
                                      $goal = $row->goal;
                                      echo ceil((($donatedAmount)/$goal)*100)."%"; 
                                ?>
                            </td>
                        </tr>
                    <?php       
                    }                   
                ?>
                    <tr>
                        <td colspan="2" align="left">
                            <input type="button" class="button" onclick="topDonationForm(<?php echo $row->id ; ?>);" value="<?php echo JText::_('JD_DONATE'); ?>" />    
                        </td>
                    </tr>
            </table>    
        </td>
    </tr>                               
    <?php   
    }
?>  

<input type="hidden" name="option" value="com_jdonation" />
    <input type="hidden" name="task" value="" />
    <input type="hidden" name="campaign_id" value="0" />
    <input type="hidden" name="Itemid" value="<?php echo $itemId; ?>" />    
</table>
    <script language="javascript">
        function topDonationForm(campaignId) {
            var form = document.top_campaign_form ;
            form.campaign_id.value = campaignId ;
            form.task.value = "donation_form";
            form.submit();
        }       
    </script>
</form>

如果有人可以提供帮助,那就太好了: - )

问候。

戴夫

0 个答案:

没有答案