Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Check out my Snippets

    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);
    }

  • #2
    Regular Coder RexxCrow's Avatar
    Join Date
    Jul 2006
    Location
    California
    Posts
    275
    Thanks
    6
    Thanked 2 Times in 2 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •