Click to See Complete Forum and Search --> : Estimated Shipping Date


ictindy
12-05-2008, 12:58 PM
Hello all,

I would like to add a "Estimated Ship Date" into a few of my web site pages. We build custom built computers and all pcs from us ship in 9 days. The estimated ship date would be 9 days from the current date that a visitor is on the web site.

Is there an easy way to add some html code the the web pages? or is there a lot more to it then I think?

Any help would be great!!

Thank You!

gil davis
12-08-2008, 06:41 AM
It takes javascript.

<script type="text/javascript">
var _next = new Date(new Date() * 1 + 24*60*60*1000*9);
alert("Your computer will be shipped on " + (_next.getMonth() + 1) + "/" + _next.getDate() + "/" + _next.getFullYear());
</script>

ictindy
12-08-2008, 10:31 AM
Well, that worked great! And thank you for it. Just one problem, it opened up in a little IE window. I just need it to be displayed as text on my ordering page.

I want to place it next to my "buy now" button at the botton of the page

Thank you

gil davis
12-08-2008, 01:36 PM
When do you want it to show up? Always, or just when "buy now" is clicked?

gil davis
12-08-2008, 01:38 PM
<form ...>
...
<input type="button" value="Buy Now!"><script type="text/javascript">
var _next = new Date(new Date() * 1 + 24*60*60*1000*9);
document.write(" Your computer will be shipped on " + (_next.getMonth() + 1) + "/" + _next.getDate() + "/" + _next.getFullYear());</script>
</form>

ictindy
12-08-2008, 02:16 PM
To better understand what i'm talking about, visit http://www.ictindy.com/cyborg.php

At the botton of the page you will see the sub total and a buy now button. Before the sub total and the buy now button is where I want to place the "Estimated Ship Date:"

gil davis
12-09-2008, 08:44 AM
Place this script in the page at the point where you want the date to appear in the page. You can put in inside any HTML markup you want.
<script type="text/javascript">
var _next = new Date(new Date() * 1 + 24*60*60*1000*9);
document.write(" Your computer will be shipped on " + (_next.getMonth() + 1) + "/" + _next.getDate() + "/" + _next.getFullYear());</script>

ictindy
12-09-2008, 12:19 PM
Works perfectly! That is excatlly what I want.

I am completely new to web design and know very little. Now if I wanted to change the color of the text in that java script, how would I go about doing that?

Thank you!!

gil davis
12-09-2008, 01:27 PM
You can put in inside any HTML markup you want.

ictindy
12-09-2008, 08:18 PM
You have been a great help! Thank You!!!