Archive for JavaScript/Ajax

Google Maps API for Flash

Just as Yahoo! created an API for Flash a few months ago, Google has followed and created one too. Im looking forward to playing around with this one, I have already messed around with the Yahoo! api. Yahoo! has done a great job of including well defined documentation.

http://code.google.com/apis/maps/documentation/flash/

Comments

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

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;
}

<form name="promoCode" onsubmit="return validate();" >
<p><label for="Specify">Promo Code:</label><br /><input type="text" size="28" maxlength="20" name="Specify" id="Specify" onChange="validate()"/>
<input class="submit" type="submit" value="Enter" name="b1" /></p>
</form>

<div id="promo1" style="display:none;border:1px solid #333;width:400px;padding:15px;font-family:verdana;margin:10px 0px;">this is for promo 1 - I won a jello stapler!</div>

<div id="promo2" style="display:none;border:1px solid #0000ff;width:400px;padding:15px;font-family:verdana;margin:10px 0px;">this is for promo 2 - I won a vacation with hulk!</div>

<div id="promo3" style="display:none;border:1px solid #ff00ff;width:400px;padding:15px;font-family:verdana;margin:10px 0px;">this is for promo 3 - Im going to disneyworld!</div>

<div id="error" style="display:none;border:1px solid #ff0000;width:400px;padding:15px;font-family:verdana;margin:10px 0px;">You have entered an invalid promo code.</div>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

Comments

Ajax Scripts

As Ajax has been gaining ground in the web world, I have been taking a closer look. I found this site that has a nice little and easy to understand tutorial on how to implement a simple to-do list.AJAX To-Do List Tutorial

Comments (1)