On page 1 a user selects a value from a pull down menu.
Page 2 is where all the functionality I need happens, and here is what I need to happen.
I have to use something along the lines of Getsession_Item to get the value from the pop up box compare it to a value entered within a text box in step, and compared to the 3 separate values in the pull down in step 1.
If the value of the pull down is larger than the amount in the text box than I need it to reduce the value using updateSession. I've written some code that I think should work, but for the life of me I cannot get it working, and firebug isn't detecting errors.
The data that goes and gets published in a review page.
$("#DeliveryMethod_T").click(function(){
var Amount_T = getSessionItem("Amount_T");
var shortAdv = 0;
temp = $("#NetEC_R").val();
var netEarned = parseInt(temp.replace(/\,/g,''));
if(("#Amount_t").val()!=""){
shortAdv = parseInt($("Amount_t").val());
}
if($("#Amount_t").val()> netEarned ){
if (netEarned >= 3000) {
Amount_t = 3000
} else if (netEarned >= 2000){
Amount_t = 2000
} else if (netEarned >= 1000){
Amount_t = 1000
}
$("#Button_Continue").click(function(){
updateSession('Amount_T', $("#Amount_T").val());
window.location.href = "/step3.a4d"
});
}
});

New Topic/Question
Reply


MultiQuote


|