Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
problem with IE not doing the same as FF - Not adding up $
Old 08-18-2007, 10:12 PM problem with IE not doing the same as FF - Not adding up $
CircleOfLinks's Avatar
Extreme Talker

Posts: 243
Name: Danny
Location: Sydney
Trades: 1
Hi guys,

im looking for someone who could help me with a problem im having with my site, if you go to http://www.aussiepages.com.au/coupon.php and check the box's in FireFox they change and add up 19 X howver many box they choose and then 'checkout' works however if you go to it in IE nothing happens when selecting the box's. even when you click the 'checkout' it only takes you to paypal. please if somebody can help ill pay you $40US for it if you can fix it for me.

please reply, pm or email me at support@aussiepages.com.au if you can help.

basically I really need it to do this. the go to the site, select a category they wish to sponsrer then checkout and be re-directed to a form.

thanks
__________________
Danny

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CircleOfLinks is offline
Reply With Quote
View Public Profile Visit CircleOfLinks's homepage!
 
 
Register now for full access!
Old 08-19-2007, 09:00 AM Re: problem with IE not doing the same as FF - Not adding up $
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by CircleOfLinks View Post
Hi guys,

im looking for someone who could help me with a problem im having with my site, if you go to http://www.aussiepages.com.au/coupon.php and check the box's in FireFox they change and add up 19 X howver many box they choose and then 'checkout' works however if you go to it in IE nothing happens when selecting the box's. even when you click the 'checkout' it only takes you to paypal. please if somebody can help ill pay you $40US for it if you can fix it for me.

please reply, pm or email me at support@aussiepages.com.au if you can help.

basically I really need it to do this. the go to the site, select a category they wish to sponsrer then checkout and be re-directed to a form.

thanks
The problem is a nested form, which means that I.E. (and Opera) cannot address the checkboxes properly.

The form named 'paypal' starts at line 520 but there is a form nested within it starting at line 546, and ending at line 1085.

The 'paypal' form ends at line 1343.

Remove the nested form and it should be fine.

There is also a problem with the dobasket function, in that it fails to check that split has returned the expected value, which means an error when the last checkbox is unchecked.
This version fixes the problem - note the lack of eval.
Code:
function dobasket()
{
    clearbasket();
    
    var totalitems;
    var output;
    var total;
    var basketsize;
    basketsize = 0;
    total = 0.00;
    output = '';
    totalitems = 41;
    document.getElementById('basket').innerHTML='';

    for(var x=1; x<=totalitems; x++)
    {
        if(document.getElementById('item'+x).checked==true)
        {
            basketsize += 1;
            var itemstring = document.getElementById('item'+x).value;
            
            thisitem = itemstring.split('|');
            
            if(thisitem && thisitem.length==2)
            {
             output = output + thisitem[0] + " &pound;" + thisitem[1] + "<br />";
             total += parseFloat(thisitem[1]);
             document.forms['paypal']['item_name_'+ basketsize].value=thisitem[0];
             document.forms['paypal']['item_number_' + basketsize].value=basketsize;
             document.forms['paypal']['amount_' + basketsize].value=thisitem[1];
           }
        }
    }
    if(output==''){
        document.getElementById('basket').innerHTML = '<i>There are currently no items in your basket</i>';
        document.forms['paypal'].amount.value=thisitem[1] = 0.00;
        
    }else{
        document.getElementById('basket').innerHTML = output + "<br/>Total: &pound;" + round(total, 2);
        document.forms['paypal'].amount.value=thisitem[1] = round(total, 2);
    }
     
}
There's also an error being generated by this section of code, which is trying to access a non-existent element with the ID 'nav':
Code:
sfHover = function() 
  {
    var sfEls = document.getElementById("nav").getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
Unless you intend to add such an element, I would remove this code.

Last edited by logic ali; 08-19-2007 at 11:33 AM..
logic ali is offline
Reply With Quote
View Public Profile
 
Old 08-21-2007, 12:13 PM Re: problem with IE not doing the same as FF - Not adding up $
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Alternatively, you could just welch and abandon the script entirely.
logic ali is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to problem with IE not doing the same as FF - Not adding up $
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22193 seconds with 12 queries