Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    336
    Plugin Contributions
    0

    Default How to put time limit on Ajax controlled images

    I'm using the Ajax Shopping Cart sidebox (the author is MIA), and there is a small image (SHOPPING_CART_AJAX_IMG_OK) which appears when putting a product in the cart.

    However, the image stays indefinitely until the customer moves their mouse. In some cases, people are getting confused by this. I would like the image to timeout after a specified amount of time, regardless of mouse movement.

    So, I've started looking into it enough to see there might be a simple solution for this.

    I found this function:
    Code:
    function ajaxShoppingCart_showOk() {
      if(document.getElementById("_loading_")) document.getElementById("_loading_").style.visibility = "hidden";	
      var imgLoading = document.getElementById("_loading_");
      timerID = setTimeout( "addHandler(document, \'mousemove\', ajaxShoppingCart_hideOk)", 500);
      with (imgLoading) {
        src = okImage.src;
        style.visibility = "visible";
      }
    }
    I played with this line for a bit but nothing good happened:
    Code:
     timerID = setTimeout( "addHandler(document, \'mousemove\', ajaxShoppingCart_hideOk)", 500);
    I read that the last number (500) is the amount of time but 1000 is like 1 second. Can anyone offer some knowledge on this?
    Currently using ZEN CART v. 1.3.6

  2. #2
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: How to put time limit on Ajax controlled images

    Quote Originally Posted by magicpants View Post
    I'm using the Ajax Shopping Cart sidebox (the author is MIA),
    Really? Nice news! Where I can get this "Ajax Shopping Cart" from MIA?

  3. #3
    Join Date
    Aug 2005
    Posts
    336
    Plugin Contributions
    0

    Default Re: How to put time limit on Ajax controlled images

    Hehehe... I was talking about YOUR module, a_berezin! MIA = missing in action. I hadn't gotten a response for a while so I thought you were gone from the site. Actually, I went MIA from this thread! Ironic.

    Anyway, your module works great for us -- except this problem: the SHOPPING_CART_AJAX_IMG_OK image doesn't disappear until the customer moves their mouse. Is there a way to add a timeout so it disappears even if the mouse doesn't move?

    I haven't seen much talk about this mod you made in the past, but I love it! I don't know why it was dropped, we get so much positive feedback about it from customers.

    MP
    Currently using ZEN CART v. 1.3.6

 

 

Similar Threads

  1. How to set time limit for new product listing?
    By andrewcklau in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 25 Apr 2018, 05:21 PM
  2. v151 payment processing time limit - time outs
    By avansant in forum General Questions
    Replies: 5
    Last Post: 3 Apr 2014, 12:06 PM
  3. How to put a maximum value limit on a coupon ?
    By samar777 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 10 Mar 2010, 02:47 PM
  4. How to put images
    By mera in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Jul 2008, 03:26 AM
  5. Does anyone know how to use Ajax on images
    By oavs in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Jun 2007, 04:35 PM

Posting Permissions

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