Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
usage of radio button for asp server in javascript

I have this code for asp server in javascript. I need to add an IF condition at the end so that it adds in the responce a "mr." if they check the male gender radio button and "miss." if check female radio button. Right in front of the name they submit. It seems pretty simple but i cant find the right syntax for it.

<%@ LANGUAGE="Javascript" %>
<HTML>
    <HEAD>
        <META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
        <meta http-equiv="Content-Type" content="text/html; charset=utf8">
        <TITLE>Main Page</TITLE>
    </HEAD>

    <BODY TopMargin="0" Leftmargin="0">
        <form action="./ask.asp" method="post">
            Student name: <input type="text" name="name" size="20"><br><br>

            Sex:
            <input type="radio" name="choice" value="Male" id="choice-Male">
            <label for="choice-Male">Male</label><br>

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

            <input type="radio" name="choice" value="Female" id="choice-Female">
            <label for="choice-Female">Female</label><br><br>       
            
            <input type="submit" value="Submit Form"><br>
        </form>

        <%
            Response.Write("Thanks " + Request.Form("name"))
        %>      
    </BODY>
</HTML>

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

the answer is to use

var genderChoice=Request.form("choice")

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda