Archive for the ‘javascript’ Category

22


June

Buy Prozac Online Without Prescription

Buy Prozac Online Without Prescription, A big and boring problem for the designers is the cross-browser compatibility, expecially with the Microsoft explorer, because, as everyone knows, Microsoft is still living in his own world and not in the w3c standard world ... Prozac samples, Anyway this is one of the most frustrating situation that we must resolve when we are working on a new layout.
The solution used by the designer are : hacks, buy Prozac without a prescription, Prozac from canadian pharmacy, workaround and different stylesheet for the different browser(usually only the Microsoft browsers).
This last is the solution that I prefer for my works, order Prozac. Order Prozac no prescription, I'm not a lover of the hacks, because they usually invalidate the code, rx free Prozac, Purchase Prozac online no prescription, and for this reason I prefer to use a different stylesheet for the explorer. If you write a good and clean code, you don't need to change all the styles, buy cheap Prozac no rx.
One of the most used solution, that I've used too, of course, are the conditional comments, to load the correct stylesheet relative to the user browser.
Another solution, is use a Javascript to detect the browser user and load the correct stylesheet, Buy Prozac Online Without Prescription. Order Prozac online c.o.d, This is the solution that I want to talk in this post.

The idea is simple, buy Prozac online cod, Online buy Prozac without a prescription, and of course you can do teh same with the most afmous frameworks, but in this case I'm using only and pure Javascipt, buy Prozac from mexico, Order Prozac from mexican pharmacy, anyway the idea is : create a variable that contains tha browser and write in the document the html code to load the stylesheet correspondent to the user browser:

var ievs = (/MSIE (\d+\.\d+);/.test(navigator.userAgent));

// IF BROWSER IS IE 6 LOAD IE6 STYLE

if (ievs){

var iev=new Number(RegExp.$1);

if (iev==6) {

document.write(’<link rel=”stylesheet”  href=”css/ie7style.css” type=”text/css” />’);

}

}

// ID BROWSER IS IE 7 LOAD IE7 STYLE

if (ievs){

var iev=new Number(RegExp.$1);

if (iev==7) {

document.write(’<link rel=”stylesheet”  href=”css/ie7style.css” type=”text/css” />’);

}
}


That's all. You can try this creating a new page and visit the page using a browser Microsoft, where can i buy cheapest Prozac online, Buy Prozac in canada, IE 6 or 7, and look how it load the style, buy cheapest Prozac, Online buying Prozac, or , only for try, where can i order Prozac without prescription, Australia, uk, us, usa, canada, mexico, india, craiglist, ebay, you can put and alert to see how it works:
if (iev==6) {

alert("you are using explorer 6");

}


Of course the conditional comments are a good solution, I usually use too, buy no prescription Prozac online, Prozac over the counter, but sometimes I prefer this way, but you need to consider that if the javascript is disabled from the browser this script doesn't works, Prozac price. Prozac for sale, of course there are very few uers with the javascript disabled today.

And hope that the Explorer 8 is better than the previous and Microsoft one day will understand how is important are the standard and, purchase Prozac online, Buy generic Prozac, especially, understand that they are not a standard ...., Prozac pharmacy. Where can i buy Prozac online, Bye. Buy Prozac no prescription. Where can i find Prozac online. Buy Prozac online no prescription.

Similar posts: Buy Wellbutrin SR Online Without Prescription. Buy Prednisone Online Without Prescription. Buy Nasonex Online Without Prescription.
Trackbacks from: Buy Prozac Online Without Prescription. Buy Prozac Online Without Prescription. Buy Prozac Online Without Prescription. Buy Prozac Online Without Prescription. Buy Prozac Online Without Prescription. Buy Prozac Online Without Prescription. Buy Prozac Online Without Prescription. Prozac pharmacy. Order Prozac. Where can i find Prozac online. Buy no prescription Prozac online. Prozac samples.

16


June

Buy Amoxicillin Online Without Prescription

One of the website that I love is facebook Buy Amoxicillin Online Without Prescription, . I'm not talking about the social network, well I like this social network, buy cheapest Amoxicillin, but I prefer twitter and linkedin for "professional use", Online buy Amoxicillin without a prescription, but this is another question, because I'm talking about the design.:)

The use of web 2.0 effects and Ajax make this web site on of my favourites.

With this tutorial I will explain you how to create a message mail system like Facebook, order Amoxicillin online c.o.d.

For make this we need to create some files. Amoxicillin from canadian pharmacy,

1. The index file with the mail form.


2.The mail.php file that process the form and send the mail, using the simple function mail() of php.


3.A css file .


4.Jquery, naturally.


5.An other Javascript, called Ajax.js, to interact with ajax, php and jquery.


Surely you can put all in one file, but, for a better understanding and to have a clean code, I prefer to use different files for each one, Buy Amoxicillin Online Without Prescription.

Well first of all you can see a demo of this page here, for logical reason I've deleted my mail from the source code, order Amoxicillin from mexican pharmacy, / you can use your mail to test the script) this is the only thing that you need to change before use the source code, Buy cheap Amoxicillin no rx, the rest is ready for use.

:)

OK, start with this tutorial.  First we need to create the form page and link to this page the jquery and ajax, buy Amoxicillin without a prescription,js script, Australia, uk, us, usa, canada, mexico, india, craiglist, ebay, so this is the code :

<div>
<div id="response">

</div>
<form id="formail" action="" method ="post">
<label>Name : </label>
<input type="text" name="name" id="name" />
<label>Your mail :</label>
<input type="text" name="mail" id="mail" />
<label>Subject : </label>
<input type="text" name="subject" id="subject" />
<label>Text :</label>
<textarea name="text" id="text" cols="40" rows="10"></textarea>
<input type="submit" value="send mail" id="sendmail" name="sendmail" />
</form>
</div>

</div>


The div called response, will be util for the validation and the text message after send the mail( or to get the error if the mail script doesn't work), this div is really important don't forget this, where can i buy cheapest Amoxicillin online.

Now we need to style this, Purchase Amoxicillin online no prescription, you can style the form as you want, but the only important thing is that the div response must be in display none :

#response{display:none;}

Is better if you style this and the form, it will look more pretty this is the complete css that I've used :
body{
background: #E7E7DC;
font-size: 13px;
font-family: arial;
}
#wrap{
width: 800px;
background: white;
margin: auto;
padding: 10px;
}
#wrap h1{
padding: 10px;
border: 1px solid #ccc;
background: #f8f8f8;
}
.mail{
width:500px;
margin:auto;
}
#formail{
width: 500px;
margin: auto;
}
#formail label{
display: block;
margin: 10px 0;
}
#text{
background: #f8f8f8;
}
#sendmail{
margin-top: 20px;
display: block;
}
#response{
display: none;
border: 1px solid #ccc;
background: #FFFFA0;
padding: 10px;
width: 450px;
}

This is the style of the page, order Amoxicillin, now it comes the nice part, Buy Amoxicillin online cod, the php and the ajax, this will be funny. Let's go and create the mail.php page, buy Amoxicillin no prescription, with this code :
<?php
$mail = $_POST['mail'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$text = $_POST['text'];

$to = "yourmail@domain.com";
$message =" You received  a mail from ".$mail;
$message .=" Text of the message : ".$text;

if(mail($to, Amoxicillin samples, $subject,$message)){
echo "mail successful send";
}
else{
echo "there's some errors to send the mail, verify your server options";
}
?>


Ok, order Amoxicillin no prescription, let me explain this:

Firs I create the variables that will contain the froms data values :

$mail = $_POST['mail'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$text = $_POST['text'];

With the variable $to, Buy no prescription Amoxicillin online, I store the mail where I want that the mail will be sended( my mail), this is the only thing that you must change to make works the script.

The $message variable get  the mail and the text of the sender, and put in the body of the mail message, Amoxicillin pharmacy. Buy Amoxicillin Online Without Prescription, Finally , with tha mail() function from php I send the mail. I've used an if because, Where can i find Amoxicillin online, if the mail doesn't work you will know.

The mail function is really simple and accept some parameters, the mail where send, where can i order Amoxicillin without prescription, the subject and the message of the mail. Purchase Amoxicillin online, You can read all from the official page of php.

Now is the time of the ajax.js. This is the complete code :

$(document).ready(function(){
$("#sendmail").click(function(){
var valid = '';
var isr = ' is required.';
var name = $("#name").val();
var mail = $("#mail").val();
var subject = $("#subject").val();
var text = $("#text").val();
if (name.length<1) {
valid += '<br />Name'+isr;
}
if (!mail.match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)) {
valid += '<br />A valid Email'+isr;
}
if (subject.length<1) {
valid += '<br />Subject'+isr;
}
if (text.length<1) {
valid += '<br />Text'+isr;
}
if (valid!='') {
$("#response").fadeIn("slow");
$("#response").html("Error:"+valid);
}
else {
var datastr ='name=' + name + '&mail=' + mail + '&subject=' + subject + '&text=' + text;
$("#response").css("display", Amoxicillin price, "block");
$("#response").html("Sending message .... ");
$("#response").fadeIn("slow");
setTimeout("send('"+datastr+"')",2000);
}
return false;
});
});
function send(datastr){
$.ajax({
type: "POST",
url: "mail.php",
data: datastr,
cache: false,
success: function(html){
$("#response").fadeIn("slow");
$("#response").html(html);
setTimeout('$("#response").fadeOut("slow")',2000);
}
});
}


What i've done, Buy Amoxicillin Online Without Prescription. Online buying Amoxicillin, let me explain :

I suppose that you know the $(document).ready function of jquery, I've explained in the previous tutorial, create an animated menu with jquery, rx free Amoxicillin.

When #sendmail, Buy Amoxicillin from mexico, the submit button of the form,  is clicked will start the validation of the form, this is important try always to validate your forms, where can i buy Amoxicillin online, expecially for the breakballs(usually called spammer...), Amoxicillin over the counter, so the first part of the script validate the form and if on of the input value is under 0 this will stop the script and return an error like in this image

validation

the text that appears is stored in the #response div, for this reason I said that is important and not only for this. :)

var valid = '';
var isr = ' is required.';
var name = $("#name").val();
var mail = $("#mail").val();
var subject = $("#subject").val();
var text = $("#text").val();
if (name.length<1) {
valid += '<br />Name'+isr;
}
if (!mail.match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2, buy Amoxicillin in canada,4}$)/i)) {
valid += '<br />A valid Email'+isr;
}
if (subject.length<1) {
valid += '<br />Subject'+isr;
}
if (text.length<1) {
valid += '<br />Text'+isr;
}

To validate the mail, Amoxicillin for sale, I've used a regular expression( thanks to Juan Carlos :) )
if (!mail.match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i))

if you try to write 2 mail addres, this will not works, buy Amoxicillin online no prescription, or if you use white space in the mail field the validation will stop the script. Buy generic Amoxicillin, You can try simply leaving white the various fields to understand how it works. All of the error in the validation will appears in the response div Buy Amoxicillin Online Without Prescription, , that will appear with a fadeIn effect.
if (valid!='') {
$("#response").fadeIn("slow");
$("#response").html("Error:"+valid);
}

The second part of the script is for create the datastr variable, that will store the value from the form and send in the ajax request, and make appear again the #response div, yes how I said is important ejejeje, like the facebook style, that say that the message is sending.
else {
var datastr ='name=' + name + '&mail=' + mail + '&subject=' + subject + '&text=' + text;
$("#response").css("display", "block");
$("#response").html("Sending message .... ");
$("#response").fadeIn("slow");
setTimeout("send('"+datastr+"')",2000);
}

In the final  part I've used a "return false", so when you click on the submit button this doesn't do nothing, well it seems that the button doesn't do nothing, but the reason ts that the rest of the work is done by ajax and the function send :
function send(datastr){
$.ajax({
type: "POST",
url: "mail.php",
data: datastr,
cache: false,
success: function(html){
$("#response").fadeIn("slow");
$("#response").html(html);
setTimeout('$("#response").fadeOut("slow")',4000);
}
});
}

This is the "core" of the script, this will call the $.ajax function of Jquery, give it the parameters and call the mail.php file, finally get the response of the mail.php, and return this in the response div, and after 4 seconds the text fade out. :)

This script is inspired ,how I said, from facebook message system and it works at the same way, you can use on your own and change or modify the source code.

Here is the demo of the script

Here you can download directly the script.
I hope is useful , you can use the comments and let me know what do you thing.

If you know something to improve the script, let me know pls.

Bye !.

Similar posts: Buy Soma Online Without Prescription. Buy Tramadol Online Without Prescription. Buy Clomid Online Without Prescription.
Trackbacks from: Buy Amoxicillin Online Without Prescription. Buy Amoxicillin Online Without Prescription. Buy Amoxicillin Online Without Prescription. Buy Amoxicillin Online Without Prescription. Buy Amoxicillin Online Without Prescription. Buy Amoxicillin Online Without Prescription. Buy Amoxicillin Online Without Prescription. Order Amoxicillin from mexican pharmacy. Order Amoxicillin from mexican pharmacy. Buy Amoxicillin online no prescription. Buy cheapest Amoxicillin. Amoxicillin for sale.