Reffering server side variables in Javascript

Discussion in 'OT Technology' started by Diablow, Apr 2, 2003.

  1. Diablow

    Diablow Guest

    I have a server side variable TechSkills”&x&”.

    How do I refer it to in Javascript?

    This is what I am trying to do,


    Code:
    if (formObj.LastName.value == "" && formObj.TechSkills"&x&".value == "") 
    
    { 
    
    alert("Please enter at least one of the following criteria: \nLast Name,\nFrist Name,\nTravel Preferences") 
    
    return false 
    
    }
     
  2. carlin

    carlin Guest

    try something like this...
    Code:
    var techSkills = <%=ServerVariable%>
    if (formObj.LastName.value == "" && techSkills == "") 
    { 
    alert("Please enter at least one of the following criteria: \nLast Name,\nFrist Name,\nTravel Preferences") ;
    return false;
    }
    
     
  3. Diablow

    Diablow Guest

    Thats what I finally figured out and did
    thanks!
     

Share This Page