1 Reply Latest reply on Jan 25, 2010 7:58 PM by carl schooff

    Query string variable based on Coldfusion template body element id

    barnboyd

      I'm using a Coldfusion Dreamweaver template with cfinclude tags.  The header contains a flash movie where I'd like to pass 2 variables via a query string to load the correct image and menu button based on the variables in the ActionScript.

       

      Example:  <param name="movie" value="flash/header_v8.swf?pic=1&button=1" />

       

      pic variable can be 1 - 3 and button variable can be 1 - 7  depending on the each pages body element id.  So the logic would be something like this for my flash movie:

       

      if body id =home, then pic=1 and button=1

      if body id =about, then pic=current variable and button=2

      if body id =page3, then pic=1 variable and button=3

      if body id =page4, then pic=2 variable and button=4

      if body id =page5, then pic=3 variable and button=5

      if body id =page6, then pic=current variable and button=6

      if body id =page7, then pic=current variable and button=7

       

      What's the best way to pass these variables depending on the current page body element id?

        • 1. Re: Query string variable based on Coldfusion template body element id
          carl schooff Level 3

          i believe you are going to need javascript to play the role of middle-man between your html content and your flash. I regret to say that my js skills are not good enough to be of any real help.

           

          is this site using coldfusion with a database? or are you just using cf includes? it might be possible to do a cfelse statement as well. it might be easier to get cf to read a query string in the url than have javascript detect the body id.