string index out of range: 0

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default string index out of range: 0

    I cant see why I am getting this. I am passing some vars from one page to
    another and would only like to display the variable if it is defined. Here is
    sample of what I am trying:

    <cfoutput>
    <cfif isdefined(birthdate) is ""> <!-- I have also tried <cfif
    isdefined(birthdate) is "null"> -->
    Birth Date: #birthdate#
    </cfif>
    </cfoutput>
    On the previous form that passes this var, it just a text box. What am I
    missing? TIA

    rmorgan Guest

  2. Similar Questions and Discussions

    1. String Index Out of Range: -2
      I have created a form that generates an error when i post it live and try to submit it. The action page generates an error that says: string index...
    2. STRING INDEX OUT OF RANGE: -12
      I am using a form to upload images into the images folder. Tha path to the image it is stored into the database. all works fine on my pc using...
    3. String index out of range: -16
      I am using the CFFILE shown below to try and upload a PDF file. I get the error: String index out of range: -16 Am running CFMX 6.1 on a WIN2000...
    4. String Index Out of Range Error on String ComparisonQuery
      I am running CFMX 6.1 on Linux connecting to a PostgreSQL database server. I am performing a simple SELECT * where somestring = thisstring When I...
    5. String index out of range: -6
      I have a form that allows people to upload files to the server. Details about the users are stored to a database as is the location of their uploads...
  3. #2

    Default Re: string index out of range: 0

    How about....

    <cfif isdefined(birthdate) AND birthdate EQ "">

    Phil
    paross1 Guest

  4. #3

    Default Re: string index out of range: 0

    Thanks, but this still did not work, any other suggestions?
    rmorgan Guest

  5. #4

    Default Re: string index out of range: 0

    It should be:

    <cfoutput>
    <cfif isdefined("birthdate")>
    Birth Date: #birthdate#
    </cfif>
    </cfoutput>

    theriversideweb Guest

  6. #5

    Default Re: string index out of range: 0

    DOH!!! Yeah I knew that ;)

    rmorgan Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139