Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Mar 2010
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    one link brings me to 2 locations

    ok i am very confused and it is only doing this in IE... (thanks MS)

    so when I click on the link below it brings me to index. now on the index page I click view cart (the exact same link) it brings me to the view cart page.

    any ideas?
    cheers,

    http://www.feelgoodlightups.com/cgi/cart.cgi?viewcart

  • #2
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    guessing here. should it not be /cgi-bin/cart.cgi?viewcart

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #3
    New Coder
    Join Date
    Mar 2010
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no, it was set up a long time ago as the link above. I have no idea why this occurring but it is killing me! I need to figure this out soon, so if anyone has any ideas they are very much appreciated.

    cheers,

  • #4
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,942
    Thanks
    2
    Thanked 169 Times in 164 Posts
    You need to show us your cart.cgi script.

    Are you using server side sessions and doing a redirect based on the status of the session?

  • #5
    New Coder
    Join Date
    Mar 2010
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    here i am calling multiple items to the shopping cart with a click and trying to direct them to the view cart cgi.
    the adding multiple items works fine.
    here is the script:
    PHP Code:
    <script type="text/javascript"><!--
        $(
    '.add-items').live('click', function(evt) {
            if (
    evt.button != 0) return;
            
    evt.preventDefault();
           
            var 
    items = $(this).attr('href').substr(1).split(',');
     
            
    mySuccess();
             
             function 
    mySuccess() {
              if (
    items.length 0) {
               
    addItemToCart(items.pop());
                } else {
                  
    top.location.href 'http://www.feelgoodlightups.com/cgi/cart.cgi?viewcart';
              }
          }
             function 
    addItemToCart(itemId) {
                $(
    this).attr('disabled','disabled');
               
             $.
    ajax({
                    
    url'/cgi/cart.cgi?'+itemId,
                    
    successmySuccess,
                    
    error: function() {
                        
    alert('Error occurred. Check the content of your cart.');
                        
    location.reload();
                    },
                })
          }
        });
        
        
        
    //--></script> 

  • #6
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,942
    Thanks
    2
    Thanked 169 Times in 164 Posts
    If you need help with your javascript code, I can move this to the proper area.

    If you need help with your Perl code, you'll need to post the Perl script.

  • #7
    New Coder
    Join Date
    Mar 2010
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I can not touch the server-side stuff. So I am guessing move it on over to the proper JS area. If you have any ideas about this as well please share

    cheers,

  • #8
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,942
    Thanks
    2
    Thanked 169 Times in 164 Posts
    On second thought, since most of the comments are unrelated to the solution you're needing, it might be better for you to combine your original post with post #5 and start a brand new thread instead of me moving this entire thread.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •