Go Back   CodingForums.com > :: Server side development > Perl/ CGI

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-04-2010, 08:09 PM   PM User | #1
bfly03
New Coder

 
Join Date: Mar 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
bfly03 is an unknown quantity at this point
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
bfly03 is offline   Reply With Quote
Old 05-04-2010, 11:20 PM   PM User | #2
bazz
Master Coder

 
Join Date: Apr 2003
Location: in my house
Posts: 5,211
Thanks: 39
Thanked 201 Times in 197 Posts
bazz will become famous soon enoughbazz will become famous soon enough
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
bazz is offline   Reply With Quote
Old 05-04-2010, 11:47 PM   PM User | #3
bfly03
New Coder

 
Join Date: Mar 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
bfly03 is an unknown quantity at this point
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,
bfly03 is offline   Reply With Quote
Old 05-05-2010, 01:21 AM   PM User | #4
FishMonger
Super Moderator


 
Join Date: May 2005
Location: Southern tip of Silicon Valley
Posts: 2,753
Thanks: 2
Thanked 149 Times in 144 Posts
FishMonger will become famous soon enoughFishMonger will become famous soon enough
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?
FishMonger is offline   Reply With Quote
Old 05-05-2010, 01:46 AM   PM User | #5
bfly03
New Coder

 
Join Date: Mar 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
bfly03 is an unknown quantity at this point
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> 
bfly03 is offline   Reply With Quote
Old 05-05-2010, 03:50 AM   PM User | #6
FishMonger
Super Moderator


 
Join Date: May 2005
Location: Southern tip of Silicon Valley
Posts: 2,753
Thanks: 2
Thanked 149 Times in 144 Posts
FishMonger will become famous soon enoughFishMonger will become famous soon enough
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.
FishMonger is offline   Reply With Quote
Old 05-05-2010, 04:22 AM   PM User | #7
bfly03
New Coder

 
Join Date: Mar 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
bfly03 is an unknown quantity at this point
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,
bfly03 is offline   Reply With Quote
Old 05-05-2010, 12:58 PM   PM User | #8
FishMonger
Super Moderator


 
Join Date: May 2005
Location: Southern tip of Silicon Valley
Posts: 2,753
Thanks: 2
Thanked 149 Times in 144 Posts
FishMonger will become famous soon enoughFishMonger will become famous soon enough
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.
FishMonger is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 04:48 PM.


Advertisement
Log in to turn off these ads.