...

View Full Version : Check out my Snippets



delangie7
07-29-2006, 01:31 AM
Code(a)
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?
AND..
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";
}
alert(messageString);
}

RexxCrow
07-29-2006, 02: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum