Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    3

    Unanswered: Checkbox depending on another field. How ?

    Hi,
    My question is is there a way to make my checkbox dymanic. I want to do this: I have a date field where by default you see the current date I have some other fields and finaly I have a Confirmation field which is "Yes/No" field. The idea is that when someone enters data with todays date or past date the confirmation field must be set to Yes and if the date is in the future the checkbox must record No! Do you have any idea how this can be done

    P.S. The confirmation field can be hidden it is not mandatory to be dynamicly changing on the page!

    Thanks in advance,
    Pravetz

  2. #2
    Join Date
    Oct 2003
    Location
    Pune
    Posts
    59
    You can do this by writing a javascript on some event of the text changes.
    where u have to check the date in the function and depneding on the date change the value of your check box

    cyrus

  3. #3
    Join Date
    Oct 2003
    Posts
    3

    how

    Yeah I know that it can be done using JavaScript, but how exacly should this script look like? Anyone???
    Now I'm working on another version using an IF statement in the asp script something like:
    Code:
    Date = Request.Form("Date")
    If Date <= Date() Then
        rs("Confirmed") = true
    Else
        rs("Confirmed") = false
    End If
    However it is not working right any ideas?

  4. #4
    Join Date
    Oct 2003
    Posts
    3

    I did iiiiiiiiiit :)

    Ok I figured this out
    it's something like this:
    Code:
    Date = Request.Form("Date")
    rs("Date") = Date
    If rs("Date") <= Date() Then
        rs("Confirmed") = true
    Else
        rs("Confirmed") = false
    End If
    I am pasing only the code that is involved with my question so it may be a little confusing.

  5. #5
    Join Date
    Oct 2003
    Location
    Pune
    Posts
    59

    Smile

    Good !!!!!!!!!


    Congrats

    Cyrus

Posting Permissions

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