navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Setting Checkbox during DRW

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Setting Checkbox during DRW
Page: [1]
 
EasyBee

 

Posts: 13
Joined: 5/1/2003
Status: offline

 
Setting Checkbox during DRW - 7/24/2007 14:01:43   
I’ve got a DRW form with 50+ Features, each feature is a checkbox..

ps_feature01, ps_feature02, ps_feature03 etc….

ps_feature01 Value is “Power Steering”, I’m trying to set the checkbox On or Off based on contents of field.. DBF field type is Text not Yes/No so “Power Steering” is stored in field if checkbox is ON..

Code:
<input type="checkbox" name="ps_feature01"
<% IF Trim(Request(FP_FieldHTML(fp_rs,"ps_feature01"))) = "Power Steering" Then Response.Write " checked"%>
value="Power Steering"> Power Steering</font></td>

What is wrong with this code?

I’ve tried all I know to get this to work, I have changed the “=” sign to “<>” and the box gets set ON, I know the ps_feature01 field is “Power Steering” coming from DBF…

I've also researched this forum and have found some information but not any thats requesting FP_FieldHTML
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Setting Checkbox during DRW - 7/24/2007 14:15:00   
quote:

IF Trim(Request(FP_FieldHTML(fp_rs,"ps_feature01"))) = "Power Steering" Then


If it's an Access DB, I'd try this:

IF FP_Field(fp_rs,"ps_feature01") = -1 Then

If they are Yes/No fields that should work. Note that I did *not* use FP_FieldHTML but rather just FP_Field.

Hope it helps.

<shameless>P.S. DId you see the link regarding checkboxes in my sig?</shameless>
Doesn't use the DRW tho...

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to EasyBee)
EasyBee

 

Posts: 13
Joined: 5/1/2003
Status: offline

 
RE: Setting Checkbox during DRW - 7/24/2007 14:58:53   
Its not a Yes/No field, it is a TEXT 40 char long..
It actually holds "Power Steering" if Checked ON
And BLANK if OFF..

I tried this:
<input type="checkbox" name="ps_feature01"
<% IF FP_Field(fp_rs,"ps_feature01") <> " " Then Response.Write " checked"%> value="Power Steering"> Power Steering</font></td>


This worked until I made a change to OFF and then back ON..
How can I test for a BLANK field?

(in reply to rdouglass)
EasyBee

 

Posts: 13
Joined: 5/1/2003
Status: offline

 
RE: Setting Checkbox during DRW - 7/24/2007 15:31:59   
I think I got it..

This code seems to work..

<input type="checkbox" name="ps_feature01"
<% IF Trim(FP_Field(fp_rs,"ps_feature01")) <> "" Then Response.Write " checked"%>
value="Power Steering"> Power Steering</font></td>

Thanks for your help....

(in reply to EasyBee)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Setting Checkbox during DRW - 7/24/2007 17:04:14   
quote:

DBF field type is Text not Yes/No


You told me that too. Sorry I missed it. :)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to EasyBee)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Setting Checkbox during DRW
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts