I need some cross browser support here before I leap off my balcony
this morning.

I am working on a simple store which has links for the shopper to
enter a coupon code. These open a coupon code entry window. When the
user enter the code and clicks submit the following actions fire off;
check code for a match, if it's a match it posts a code to a php
script using the .post function which writes a record to the db, then
forces a page reload where the store checks the db for the coupon test
pass.

My question is that it works perfectly in both IE 6, 7 , 8 and Firefox
3.04 but the .post fails in Safari 4.03.

I am using this version of jQuery (everything is working fine except
for the post back to the php script):

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/
libs/jquery/1.3.2/jquery.min.js"></script>

My js functions are as folows:

function checkCode (){
        var couponParm = document.getElementById("coupon").value;
        var input = sha1(couponParm);
        var gradCode = "87dcce06a223ffd060aec5a027a00422ebfc6d8d";



        if (input == gradCode){
                updateSession();
                reloadWindow();
        }
}
function updateSession (){
        $.post( "includes/update.php", { action: "y" });
}
function reloadWindow(){
        var url = window.location;
        alert(url);
        window.location.reload();
}

Reply via email to