Current location: Hot Scripts Forums » Programming Languages » ASP » Checkbox depending on another field. How ?


Checkbox depending on another field. How ?

Reply
  #1 (permalink)  
Old 10-07-03, 02:20 AM
pravetz pravetz is offline
New Member
 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-07-03, 03:04 AM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
javascript

no idea how tho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 10-07-03, 03:43 AM
pravetz pravetz is offline
New Member
 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
I have no idea also :(

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 10-07-03, 04:02 AM
pravetz pravetz is offline
New Member
 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 10-07-03, 06:36 PM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
oh right sorry you didnt explain very well or i didnt read it properly
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
echo in a form field tgarske PHP 2 08-25-03 06:34 PM
dynamic web pages using the checkbox component oasp Script Requests 1 08-11-03 10:07 AM
change my field in this example sal21 ASP 3 07-14-03 03:49 AM
field of db access whit a blank sal21 ASP 2 07-07-03 12:40 PM
Query Dump for blob field type ridwank PHP 4 06-20-03 12:35 PM


All times are GMT -5. The time now is 02:03 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.