Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 57357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:40:43+00:00 2026-05-10T17:40:43+00:00

I have a very simple bit of script that changes the status of an

  • 0

I have a very simple bit of script that changes the status of an item in a MySql database – it works fine in IE7, but if I try it in Firefox, it looks like it’s worked, but hasn’t… Which is extremely odd.

The code is very simple – first I get the details of the record I’m looking for:

<cfscript> // Get the Product Attribute details Arguments.qGetProductAttribute = Application.cfcProducts.getProductAttributes(Arguments.iProductAttributeID); </cfscript> 

This is working fine, if I dump the results, it’s just the content of the record as expected. So then I use an if statement to change the ‘active’ field from one to zero or vice versa.

<!--- If Product Attribute is active, mark as inactive ---> <cfif Arguments.qGetProductAttribute.bActive EQ 0>     <cfquery name='qChangeStatus' datasource='#Request.sDSN#'>     UPDATE  tblProductAttributes     SET     bActive = <cfqueryparam value='1' cfsqltype='CF_SQL_INTEGER' maxlength='1' />     WHERE   iProductAttributeID = <cfqueryparam value='#Arguments.iProductAttributeID#' cfsqltype='CF_SQL_INTEGER' />;     </cfquery>  <!--- Else if Product Attribute is inactive, mark as active ---> <cfelseif Arguments.qGetProductAttribute.bActive EQ 1>     <cfquery name='qChangeStatus' datasource='#Request.sDSN#'>     UPDATE  tblProductAttributes     SET     bActive = <cfqueryparam value='0' cfsqltype='CF_SQL_INTEGER' maxlength='1' />     WHERE   iProductAttributeID = <cfqueryparam value='#Arguments.iProductAttributeID#' cfsqltype='CF_SQL_INTEGER' />;     </cfquery> </cfif> 

I can’t see any reason whatsoever for this not to work… and indeed, in IE7 it works perfectly…

What happens is after this script is run, the browser goes back to the page that displays all of these records. For each record if the ‘bActive’ field is set to ‘1’, it will display the word ‘Active’ and if it’s set to ‘zero’, it will display ‘Disabled’. Simple enough.

If I run the script to disable a record, Firefox actually displays the word ‘disabled’ as expected, but the database record doesn’t change!

I’m at a loss… how can server-side code work fine in one browser and not in another?!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:40:43+00:00Added an answer on May 10, 2026 at 5:40 pm

    I found the cause of the problem… Firebug.

    I haven’t the slightest idea what Firebug thinks it’s doing, if I remove the ‘cflocation’ tag from the script (the one that takes the user back to the summary page), then it works fine. But if I keep it in, Firebug seems to run the function again before forwarding the browser to the summary page.

    There’s no reason for it to be doing this. Un-bloody-belivable.

    At least it won’t be happening on the clients’ machines.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I can't recall it from the top of my head… May 11, 2026 at 11:19 am
  • added an answer &#151; is wrong. When you use numeric character references, the… May 11, 2026 at 11:18 am
  • added an answer Use the width and precision specifiers, set to the same… May 11, 2026 at 11:18 am

Related Questions

I have a very simple bit of script that changes the status of an
I have a very simple problem which requires a very quick and simple solution
I have a very simple WPF application in which I am using data binding
I have a very simple TCP server written in C. It runs indefinitely, waiting
I have a very simple Java RMI Server that looks like the following: import
I have a very simple ASP.Net page that acts as a front end for
I have a very simple question. I want to test whether a particular port
I have a very simple html. The red div is inside the blue div
I have a very simple table and I can happily query it using LINQ
I have a very simple problem and a solution that will work, but I'm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.