Skip to main content
May 3, 2008
Question

cfif question

  • May 3, 2008
  • 6 replies
  • 457 views
I have this cfif wrapped around a table that i would only like to appear IF searchcriteria or step1 is in the URL, but when i go to preview the page the table appears regardless of the cfif. Any ideas why?
    This topic has been closed for replies.

    6 replies

    BKBK
    Community Expert
    Community Expert
    May 7, 2008
    K0rrupt wrote:
    > I figured it out. Cause the cfparam set a default of ""

    Could have saved yourself 3 days. I asked you this: "Did you initialize one of the variables earlier in the code?

    > I got a new thing here.....
    Would have been better to close one thread before starting another. In any case, an answer to your current problem could be to use the anchor tag. For example, put <A name="tuxedo"> where you want to jump. The URL to propel you there is then http://etc/etc/info.cfm#tuxedo



    May 6, 2008
    I figured it out. Cause the cfparam set a default of "" i just redid the cfif to

    <cfif URL.SearchCriteria EQ "">

    I got a new thing here.....

    I have a form that when someone clicks on a certain button is displays the info and if a different one is pressed it displays the info for that and so on. One thing i noticed is that everytime a new form button is pressed the form resets back to the top causing the user to have to scroll down everytime to view the new information. Is there a way to stop that from happening?

    The for is set to #CGI.Script_Name# for the action
    BKBK
    Community Expert
    Community Expert
    May 3, 2008
    Dan Bracuk wrote:
    cfdump your url.

    Best, in my opinion. Just thought of another common banana peel: action page of a form with get method.

    Inspiring
    May 3, 2008
    cfdump your url. Do those variable names appear?
    May 3, 2008
    i tried it in 3 different browsers and it's the samething. I would post the entire page of code, but it's alot of code to read. Besides i have this at the top which has always worked for me in the past.

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">

    If you like i can post a link so you can download this page and so it would be easier to read the code.
    BKBK
    Community Expert
    Community Expert
    May 3, 2008
    If there is no Searchcriteria and no Step1 in the URL then the table should not display. Is your browser perhaps displaying a cached page? Did you initialize one of the variables earlier in the code?