Passing session variable

Is it possible to pass a session variable from a mouse-click on gif, radio button, or checkboxes?
I prefer to have a session variable solution for gif.   I want to pass a session variable when a gif is clicked where there are multiple gifs from cfloop and all of the gifs have a unique value with hidden fields if needed.  
If it is not possbile with gif, I prefer to have the solution with checkboxes and/or radio buttons.
Please show me examples.
Who is Participating?
If it is a session variable, then it will be available on every page once it has been set for the lenght of the user session or until you delete the var.  

You can use form variables, and either post them to the next page or add them to the query string.  For the example you describe, you might best be served with radio/checkboxes.

<form name="gif_form" method="post" action="form_process.cfm">
  <cfloop from="1" to="10" index="n">
      <input type="radio" name="gif_select" value="some_value_to_be_determined_#n#"> //put gif or text here  </br>  

  <input type="submit" value="Submit">

//- note you can build the list as shown above or you can put the form items into a table.  Just depends on your needs
JohnLucaniaAuthor Commented:
<input type="image" id="trash#MyInstallments.installID#" src="./images/trash.gif" onclick=";return redirectForm('<cfoutput>#MyInstallments.installID#</cfoutput>');" />
where onclick redirects to the page after the data submission.

If I use gif, would it be:
<input type="image" id="trash#MyInstallments.installID#" src="./images/trash.gif" value=#MyInstallments.installID#> ?
then, how do you get the #MyInstallments.installID# on the next page?

If not possible, how do you get the #MyInstallments.installID# when you you are using checkboxes (for multiple variable passing)?  
JohnLucaniaAuthor Commented:
I resolved it.  Thank you for all your help on this.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.