Copy link to clipboard
Copied
I have rollover buttons: A B C D E ..... Z and I want to assign a variable to the letter that is hovered or clicked by the mouse.
example <CFSET findchar = 'A%'> when user clicks or hovers over the "A"
Is is possible to read the text from the page on a mouse hover or click event and then use something like: <cfset findchar=(text on from mouse event)> to set the text to a string variable so that it can be used in a query like the one below?
<cfquery name="name" datasource="source">
SELECT * FROM Personnel
WHERE LastName like '#findchar#'
ORDER BY LastName ASC, FirstName ASC;
<cfquery>
Or does this require javascript?
Copy link to clipboard
Copied
You could use AJaX to set a session variable.
Just have another page (just for this functionality) that will set the session.findchar to whatever letter was clicked.
^_^