Cflocation with thickbox

Discussion in 'Programming' started by forumposters, Apr 3, 2007.

  1. #1
    I want to use cflocation to open up a page in a thickbox window. Normally, you can just add class="thickbox" to any old link and it will open up that page in a thickbox. Is it possible to redirect a user to a thickbox with cflocation?
     
    forumposters, Apr 3, 2007 IP
  2. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #2
    could you show your code? it will help us better
     
    datropics, Apr 3, 2007 IP
  3. JasonBartholme

    JasonBartholme Peon

    Messages:
    396
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I use <cflocation> for redirects after an action. I am assuming that you would just need to add the class="thickbox" in the anchor tag. I don't think you need <cflocation>.

    Please clarify, if I am not understanding.
     
    JasonBartholme, Apr 3, 2007 IP
  4. forumposters

    forumposters Peon

    Messages:
    270
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here's my code:
    <cfif NOT listlen(jobidlistfinal)>
    <cflocation url="index.cfm?tagidlist=#tagidlist#&error=yada yada."/>
    </cfif>

    I can't add class = "thickbox" to that. Is there another way to do it?
     
    forumposters, Apr 3, 2007 IP
  5. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Don't mix up the two:

    I see what you are doing here but try not to send the error text as a URL Variable:

    <cfif NOT listlen(jobidlistfinal)>
    <cflocation url="index.cfm?tagidlist=#tagidlist#"/>
    </cfif>

    Then in your refreshed page have an IF statement that puts in the class accordingly
     
    datropics, Apr 4, 2007 IP
  6. forumposters

    forumposters Peon

    Messages:
    270
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I don't think thickbox works that way. You have to somehow add the class in the href tag or on the page that is doing the redirect rather than the thickbox page that is redirected too.
     
    forumposters, Apr 4, 2007 IP
  7. IsRoss()

    IsRoss() Peon

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This may be a stupid question, but what is thickbox?
     
    IsRoss(), Apr 4, 2007 IP
  8. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #8
    thickbox allows images to be displayed in the web-page whilst 'fading' the background....it's pretty cool actually.

    Ok forumposters, you're CFLocation goes to a page, that page has the href with the class. In case you want it as a result of something, but in a url variable in the cflocation then place an IF statement in the resulting page. If the URL variable exists, then add the class attribute to the href

    Hope This Helps, but it would be cool if you put up the code
     
    datropics, Apr 4, 2007 IP