TurboManage

David Chandler's Journal of Java Web and Mobile Development

  • David M. Chandler


    Web app developer since 1994 and Google Cloud Platform Instructor now residing in Colorado. Besides tech, I enjoy landscape photography and share my work at ColoradoPhoto.gallery.

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 223 other followers

  • Sleepless Nights…

    August 2004
    S M T W T F S
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  
  • Blog Stats

    • 1,029,897 hits

Archive for August 5th, 2004

Missing CFOUTPUT causes double submit

Posted by David Chandler on August 5, 2004

Recently, I came across a bizarre bug in which a page was being called twice as a result of a single click on a SUBMIT button.

The following code was the culprit:

<LINK REL=STYLESHEET TYPE=”text/css” HREF= “#variables.dir#/style.htm”>

How can a style sheet cause a double request? Well, note the absence of a CFOUTPUT. The href path begins with a pound, which is the HTML “bookmark” character that means look for a given page and scroll to a position. In the absence of a specified page (somewhere.cfm##bookmark), the browser looks for the bookmark in the current URL, so it made a GET request to the same URL it had just POSTed. Since none of the FORM values were present in the GET request, CF encountered an error, but because it was in response to a style sheet include, the error message never appeared on the page.

Make sure your HREFs with # signs are inside a CFOUTPUT block.

Posted in Uncategorized | Leave a Comment »

 
%d bloggers like this: