radio buttons VBS and ASP

  • **the output might be funky

    my problem is that i don't know how to fix the form action value(extracted from below):

    input type="hidden" name="action" value="t">-->

    i would like the value to be the value of whatever radio button is checked.

    question: how do i make this work?

    this is my form:

    form action="<%=strFileName%>" method="get">

    tr>

    td width="100" align="right" valign="middle">Search by:

    td>

    input name="sc" type="radio" value="t" checked>Title

    input name="sc" type="radio" value="pd">Date

    input name="sc" type="radio" value="pub">Publisher

    input name="sc" type="hidden" value="<%'= radio_value %>"> -->

    /td>

    /tr>

    tr>

    td width="100" align="right" valign="top">SEARCH:

    td align="left" valign="middle">

    input name="search" type="text" id="search" size="100">

    -->

    input type="submit" class="style1" value="Find Article(s)">

    input type="hidden" name="action" value="t">

    a href="press_view.asp">main

    /td>

    /tr>

    /form>

  • When the user selects a radio button, the form variable sc will contain "tc" "pd" or "pub" (or not exist), depending on what th e user selected.

    The is not necessary.

    Also all form fields, controls and buttons need to be enclosed in a tag pair. This wasn't visible in the code you posted.

    Terry

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply