Results 1 to 2 of 2

Thread: Dynamic radio buttons :-( stressing me out

  1. #1
    Join Date
    Jun 2012

    Dynamic radio buttons :-( stressing me out

    hi all
    my classic asp page has a form that's populated with a dynamic list of product offers filtered on the productid.
    each offer has a radio button with the offerid as the value
    so a typical offer list has radio buttons with values like 888, 889, 890 etc....
    when the form is submitted, it changes the product 'offer' based on the selection from the list.
    The problem is, i want the offer list to remember which radio button was selected and make that radio button 'checked'.
    i'm using a session variable to keep the offerid when the form is submitted.
    i have printed (response.write) the session variable value and offerid from the recordset and used an IF statement to find the offer where both the session varialbe and offerid are equal to each other.
    even though i can see which offer meets the IF criteria, i still can't get the radio button to be checked :-(

    Thanks in advance

    <input name="offerselect" type="radio" value="<%=(RSOffersRest.Fields.Item("OfferID").Value)%>" <% If Session("OfferID")=(RSOffersRest.Fields.Item("OfferID").Value) Then %> checked="checked" <%End If %> />

  2. #2
    Join Date
    Jul 2012
    did you try checked="true" ... or just checked?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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