#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    17
    Rep Power
    0

    Microsoft VBScript compilation (0x800A0401) Expected end of statement


    Hi,

    I have the above error and Please can anyone help me out.

    Thanks in advanced.

    Here is my code.

    <td width="72%" bgcolor="#F4F4F4" valign="top">

    <% If rs("Artistic_Field_Film") = document.getElementById(Artistic_Field_Film) Then
    Response.Write "Film <input type=""checkbox"" checked name=""Artistic_Field_Film"" id=""Artistic_Field_Film"" value="""&Film&""">"
    End If %>
    <% If rs("Artistic_Field_Liberary_Arts") = document.getElementById(Artistic_Field_Liberary_Arts) Then
    Response.Write "Liberary <input type=""checkbox"" checked name=""Artistic_Field_Liberary_Arts"" id=""Artistic_Field_Liberary_Arts"" value="""&Liberary Arts&""">"
    End If %>
    <% If rs("Artistic_Field_Dance") = document.getElementById(Artistic_Field_Dance) Then
    Response.Write "Dance <input type=""checkbox"" checked name=""Artistic_Field_Dance"" id=""Artistic_Field_Dance"" value="""&Dance&""">"
    End If %>
    <% If rs("Artistic_Field_Music") = document.getElementById(Artistic_Field_Music) Then
    Response.Write "Music <input type=""checkbox"" checked name=""Artistic_Field_Music"" id=""Artistic_Field_Music"" value="""&Music&""">"
    End If %>
    <% If rs("Artistic_Field_Theatre") = document.getElementById(Artistic_Field_Theatre) Then
    Response.Write "Theatre <input type=""checkbox"" checked name=""Artistic_Field_Theatre"" id=""Artistic_Field_Theatre"" value="""&Theatre&""">"
    End If %>
    <% If rs("Artistic_Field_Visaul_Arts") = document.getElementById(Artistic_Field_Visual_Arts) Then
    Response.Write "Visual Arts <input type=""checkbox"" checked name=""Artistic_Field_Visual_Arts"" id=""Artistic_Field_Visual_Arts"" value="""&Visual Arts&""">"
    End If %>
    <% If rs("Artistic_Field_Others") = document.getElementById(Artistic_Field_Others) Then
    Response.Write "Others <input type=""checkbox"" checked name=""Artistic_Field_Others"" id=""Artistic_Field_Others"" value="""&Film&""">"
    End If %>

    </td>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    103
    Rep Power
    9
    your code does not make sense because you mix together asp and javascript, but asp runs on server before page generated, but javascript is client code after browser recieved a code and page rendered... so line like
    <% If rs("Artistic_Field_Film") = document.getElementById(Artistic_Field_Film) Then
    Response.Write "Film <input type=""checkbox"" checked name=""Artistic_Field_Film"" id=""Artistic_Field_Film"" value="""&Film&""">"
    End If %>
    doe not make any sense...
    <% If rs("Artistic_Field_Film") is asp runs in sever document.getElementById(Artistic_Field_Film) is client javascript...
    the rest is asp again...
    What you are trying to accomplish?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    17
    Rep Power
    0
    Hi,

    I solved it already.

    Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo