Link to home
Create AccountLog in
Avatar of sparked
sparkedFlag for United States of America

asked on

Passing Javascript variables to ColdFusion

I found a solution that works without any redirects or page refresh to get Javascript variable into ColdFusion.  

Here is the code I used to obtain the page title and put into session variable:
<cfset session.PageTitle = "<script language='JavaScript'>document.write (document.title); </script>">
Avatar of Smart_Man
Smart_Man
Flag of Egypt image

is that a question or you are enriching the EE solutions db ?

:)

waiting for your reply
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of sparked

ASKER

Yep, I spoke too soon as it displayed the title value on the webpage but when trying to pass the page title into a database, it gave me the javascript. Oops, but at least it was a good excersize for me.