Results 1 to 4 of 4

Thread: [RESOLVED] error on line1 char4 ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Resolved [RESOLVED] error on line1 char4 ?

    sorry i mean line 4 char 1

    Code:
    // JavaScript Document
    
    //Global Variables - Journey
    var JourneyStart = document.getElementById("start").value
    var JourneyEnd = document.getElementById("end").value
    var JourneyVehicle = document.getElementById("sVehicle").value;
    var JourneyDistance = document.getElementById('txtDistance').value
    var JourneyTotalPrice = document.getElementById('txtTypeFare').value
    // Global Variables - Booking - con2
    var BookingTitleName = document.getElementById('TitleName').value
    var BookingFirstName = document.getElementById('FirstName').value
    var BookingLastName = document.getElementById('LastName').value
    var BookingEmail = document.getElementById('EmailAddress').value
    var BookingPhone = document.getElementById('PhoneNumber').value
    // Global Variables - Booking - con3
    var BookingDateDD = document.getElementById('DateDD').value
    var BookingDateMM = document.getElementById('DateMM').value
    var BookingDateYY = document.getElementById('DateYY').value
    var BookingTimeHH = document.getElementById('TimeHH').value
    var BookingTimeMM = document.getElementById('TimeMM').value
    var BookingTime12 = document.getElementById('Time12').value
    var BookingPersons = document.getElementById('NoPersons').value
    var BookingFlightNo = document.getElementById('FlightNo').value
    var BookingSpecialReq = document.getElementById('SpecialReq').value
    // Global Variables - Booking - con4
    var BookingPickupNo = document.getElementById('PickupNo').value
    var BookingPickupAddress = document.getElementById('PickupAddress').value
    var BookingPickupCity = document.getElementById('PickupCity').value
    var BookingPickupCounty = document.getElementById('PickupCounty').value
    var BookingPickupPostcode = document.getElementById('PickupPostcode').value
    
    //Get+Display Pickup Address
    	function GetPickupAddress() {
    	BookingPickupNo = document.getElementById('PickupNo').value
    	BookingPickupAddress = document.getElementById('PickupAddress').value
    	BookingPickupCity = document.getElementById('PickupCity').value
    	BookingPickupCounty = document.getElementById('PickupCounty').value
    	BookingPickupPostcode = document.getElementById('PickupPostcode').value
    	
    	document.getElementById('ConfirmAddress').write('BookingPickupNo')
    	document.getElementById('ConfirmAddress').write('BookingPickupAddress')
    	document.getElementById('ConfirmAddress').write('BookingPickupCity')
    	}
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  2. #2
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: error on line1 char4 ?

    Remove the ; from the below line

    Code:
    var JourneyVehicle = document.getElementById("sVehicle").value;

  3. #3
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    Re: error on line1 char4 ?

    The semicolon shouldn't matter - they're optional in Javascript (though I'm in favor of them for the visual clarity they provide). Is this all of your script? Can you post it in context (show your markup)?

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Re: error on line1 char4 ?

    Sorry, i was tired, fed up and in a rush. I've sorted it now, thanks anyway for your help.

    Much Appreciated, Chris1990.
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

Posting Permissions

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



Click Here to Expand Forum to Full Width