I am currently pulling a 10 digit number form a database and propulating a form.
I have recently changed the form to 3 input boxes and can't figure out how to split the data (i.e. xxx, xxx, xxxx).
Here is snippet from my current code:
Any help would be appreciated.
I have recently changed the form to 3 input boxes and can't figure out how to split the data (i.e. xxx, xxx, xxxx).
Here is snippet from my current code:
Code:
function loadModalPromo()
{
modalpromo = new Boxy("<?php loadPromoModalContent(); ?>", {title: "I do not have a Promo Code", modal: false, closeable: true, show: false });
$("#mphavecontact").click(function() {
modalpromo.hide();
});
$("#mpnotcontact").click(function() {
$("#mpoptionform").hide();
$("#mpgettingpromo").show();
$.ajax({
type: "POST",
url: "yhfiles/ajaxgetpromo.php",
data: "key=" + "<?php echo $_SESSION["ajaxget_promo_key"]; ?>",
success: function(msg){
if(msg.length == 10)
{
$("#logpromo").val(msg);
}
else
{
alert("Error in retrieving the promo code. Please contact the administrator.");
}
},
complete: function(msg){
$("#mpoptionform").show();
$("#mpgettingpromo").hide();
modalpromo.hide();
}
});
});
}
Comment