Closed Bug 314994 Opened 19 years ago Closed 17 years ago

Radio buttons come back as checked no matter what when using Coldfusion scripting when there is an cfif/cfelse code involving checking and not checking radio buttons

Categories

(Toolkit :: Form Manager, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: sageoftheabyss, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 I have a script that runs a set of cfif/cfelse conditions using Macromedia Coldfusion 6.1 server-side scripting on a series of radio buttons. The cfif/cfelse statements check in the database to see if a user has already input data involving the specific radio button input. The problem is that I have the cfif/cfelse statements set up so that if there is no previous data from that radio button input, the radio buttons should not be preselected at all. If the user does have previous data from that radio button input, the radio buttons should display the selection based on the previous information. However, my problem is that when the user does not have any previous data input, the radio buttons are still preselected upon the page loading (they should not be preselected). If the user goes through and selects a different option for these radio buttons or leaves them, if they return, the radio buttons are preselected as they should be. So the problem is simply that Firefox displays preselected radio buttons when no radio button should be preselected. Reproducible: Always Steps to Reproduce: 1. Create a series of cfif/cfelse conditions with radio buttons using Macromedia Coldfusion 6.1 server-side scription that uses a database to determine if there is any previous data in a database corresponding to the radio buttons and what it is or if there is no previous data in the database. My example: <cfif CONDITION> <cfif CONDITION> radio_button1 set to "checked" radio_button2 set not set to "checked" <cfelse> radio_button1 set not set to "checked" radio_button2 set to "checked" </cfif> <cfelse> radio_button1 set not set to "checked" radio_button2 set not set to "checked" </cfif> 2. Make a database that has no previous data relating to the radio buttons 3. Load Coldfusion page with radio buttons Actual Results: All radio buttons with a cfif/cfelse condition involving checked and unchecked radio buttons will be preselected according to the last cfelse condition regardless of whether the last cfelse case calls for any type of preselection. Expected Results: The radio buttons should not be preselected at all because the cfif condition they are referring to is the one where there is no data in the database and therefore there should be no information to be preselected according to. I have tested this by switching the cfelse conditions to cfelseif conditions to be more specific and redundant, but the problem still persists. I also have tried adding the redundant attribute condition of 'checked="no"' to all the instances where the radio buttons should not be preselected, but that does not work either. The reason I know this is a problem in Firefox 1.5 RC1 is that I have tested my Coldfusion code in Internet Explorer and Firefox 1.0.7 and the radio buttons act like they should (not being preselected).
Can you attach a HTML testcase like it appears in the browser or such? Your bug is hard to imagine you don't know Macromedia Coldfusion...
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INCOMPLETE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.