Community Forums 

Main Content

remove return url

    Jul 19 2017 10:01:37

    #1

    pcguy

    Join date : 2008-09-18      Posts : 126

    in the display cart script I want to remove the last part with the return url because I have it assigned to a actual icon, what part can I remove and still have the script work please

    <script type="text/javascript">
    //<![CDATA[
    // nothing to touch here
    function SetCookie(cookieName,cookieValue,mins){
    var today = new Date();
    var expire = new Date();
    expire.setTime(today.getTime() + 60000*mins);
    document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString();
    }
    function ReadCookie(cookieName){
    var theCookie=""+document.cookie;
    var ind=theCookie.indexOf(cookieName);
    if (ind==-1 || cookieName=="") return "";
    var ind1=theCookie.indexOf(';',ind);
    if (ind1==-1) ind1=theCookie.length;
    return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
    }
    var loc = document.location;
    var cookieResult = ReadCookie("gt_mals_total");
    if (loc.search){
    var search = loc.search.slice(1);
    if (search.indexOf("qty") >= 0){
    SetCookie('gt_mals_total',search,30); //30 mins
    }
    }

    function deleteCookie(cookieName) {
    if (document.cookie != document.cookie) {
    index = document.cookie.indexOf(cookieName);
    } else {
    index = -1;
    }
    if (index == -1) {
    document.cookie=cookieName+"=GONEcbEndCookie; expires=Monday, 19-Aug-1996 05:00:00 GMT";
    }
    //document.location.href = document.location.href;
    //to reload without queryString parameters, use the line below instead
    document.location = document.location.href.substring(0,document.location.href.indexOf("?"));
    }

    // end of nothing to touch here

    // adjust the width below to suit your needs
    document.write("<table class=\"total\"\>");
    // end of adjust the width below to suit your needs

    // nothing to touch here
    var cookieResult = ReadCookie("gt_mals_total");
    if (cookieResult == ""){
    document.write("<tr><td colspan=\"2\" style=\"align:center\">Cart empty</td></tr>");
    } else {
    var valsArray = cookieResult.split("&");
    for (i in valsArray){
    var thisValPair = valsArray;
    var thisValArray = thisValPair.split("=");
    var thisName = thisValArray[0];
    var thisVal = thisValArray[1];
    // end of nothing to touch here

    if (thisName == "qty"){
    document.write("<tr><td>Items:</td><td style=\"align:right\">" + Math.floor(thisVal) + "</td></tr>");
    }
    if (thisName == "tot"){
    document.write("<tr><td>Total:</td><td style=\"align:right\">" + "$" + thisVal + "</td></tr>");
    // change the above "" symbol to your currency symbol, example "$".
    }
    }
    document.write("<tr><td colspan=\"2\"><a href=\"http://ww12.aitsafe.com/cf/review.cfm?userid=E9120065&return=www.malsforms.com/display-cart-new.html\"_target_ >View Cart/Checkout</a></td></tr>");
    // change the return url to your page url above
    }
    document.write("</table>");
    </script>



    Jul 20 2017 13:55:32

    #2

    GT

    Join date : 2008-09-18      Posts : 3202

    Remove the return section...

    From...
    document.write("<tr><td colspan=\"2\"><a href=\"http://ww12.aitsafe.com/cf/review.cfm?userid=E9120065&return=www.malsforms.com/display-cart-new.html\"_target_ >View Cart/Checkout</a></td></tr>");
    // change the return url to your page url above
    }
    document.write("</table>");
    </script>

    To...
    document.write("<tr><td colspan=\"2\"><a href=\"http://ww12.aitsafe.com/cf/review.cfm?userid=E9120065\"_target_ >View Cart/Checkout</a></td></tr>");
    // change the return url to your page url above
    }
    document.write("</table>");
    </script>

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.