Build a dynamic JavaScript Promo Box using input text and show/hide div layers.

0

I had to build a dynamic promo box that would show/hide layers depending on which promo code was entered in the box. I searched high and wide on google for a tutorial that would show me how to achieve this, after no such luck I built it myself. I decided I might as well post this code, which might in turn help someone else.

function validate() {
if ((document.promoCode.Specify.value == "promo1" )){
document.getElementById("promo1").style.display = "block";
document.getElementById("promo2").style.display = "none";
document.getElementById("promo3").style.display = "none";
document.getElementById("error").style.display = "none";
//return false;

} else if ((document.promoCode.Specify.value == "promo2" )){
document.getElementById("promo1").style.display = "none";
document.getElementById("promo2").style.display = "block";
document.getElementById("promo3").style.display = "none";
//return false;

} else if ((document.promoCode.Specify.value == "promo3" )){
document.getElementById("promo1").style.display = "none";
document.getElementById("promo2").style.display = "none";
document.getElementById("promo3").style.display = "block";
//return false;

} else {
document.getElementById("error").style.display = "block";
document.getElementById("promo1").style.display = "none";
document.getElementById("promo2").style.display = "none";
document.getElementById("promo3").style.display = "none";
//return false;
}

//return true;
}



next door movie girl themovies cunt gushingtrailers lesbian moviemovies cock massiveadult movie quicktime clipsmovies oralpam tommy movie lee andersonmovies fuck perfectscenes in rape moviesmovie theaters raveanimal amateur porn3d video porn75 sex tipsfree porn 100 picssex pics adult moviesteens about19 teen101teen Mapporno mongoes captin playhousepornography capturingcar mpgs pornpornos caramelstar caramel the porncaptors card pornporn carebearporn carey Mapnipples swollenporn dirtylarge dickssimpsons nudesucking penislady godivabeautiful buttsgirls hogtied Mapgallery miniskirtpreteen undergroundnaked cartoonsstripping menskirts poodlebiker chickvideos handjobmilitary sex Map

LEAVE A REPLY