Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-03-2012, 02:29 PM   PM User | #1
adv
New to the CF scene

 
Join Date: Jul 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
adv is an unknown quantity at this point
countdown timer and send email

hello i am new to jquery
what i a want to do is a countdown timer and to send email

1 - starts timer 15 sec
2 - when the timer starts , get data from input fields , send email with the input fields
3 - show the timer in a specific <div
4 - when timer runs of redirect to another page


Code:
function startCountDown(i, p, f) {
// store parameters
var pause = p;
var fn = f;
// make reference to div
var countDownObj = document.getElementById("countDown");
if (countDownObj == null) {
// error
alert("div not found, check your id");
// bail
return;
}
countDownObj.count = function(i) {
// write out count
countDownObj.innerHTML = i;
if (i == 0) {
// execute function
fn();
// stop
return;
}
setTimeout(function() {
// repeat
countDownObj.count(i - 1);
},
pause
);
}
// set it going
countDownObj.count(i);
}

function myFunction() {
document.loginForm.submit();
}
this is my coundown timer function but its in javascript
on it click this image
Code:
<img id="imgAA" name="imgAA" src="images/pulsante_img.png" alt="" title="" border="0"    onClick="startCountDown(12, 1000, myFunction);">
it works but i dont know how to send email when the timer start
adv is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:58 AM.


Advertisement
Log in to turn off these ads.