View Full Version : Check out my Snippets

07-29-2006, 02:31 AM
function reserveForm() {
var myDate = new Date();
myDate.setDate(myDate.getDate() + 1);
var inDate = new Date();
var outDate = new Date();

where it says myDate.setDate...that cant be in the right place am i wrong?
I have checked the syntax and cant find the problem for this code but my debugger says its wrong.

Code(b)My Snippets

function showItinerary() {
if (document.cookie == 0)
alert("You do not have an existing itinerary!");
else {
var savedData = decodeURI(document.cookie);
var dataArray = savedData.split(";");
var messageString = "Existing Itinerary:\n";
for (var i = 0; i < dataArray.length; ++i) {
messageString += dataArray(i) + "\n";

07-29-2006, 03:03 AM
I am not quite up to working with advanced JS yet, but it looks like you are missing a few curly brackets here and there.