rbm1tch3ll
asked on
saving Javascript variable to coldfusion
Here is my code.
What I am wanting to do is save the javascript variable to a coldfusion variable.
say using <cfset javaid = ?> Any help is appreciated.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Main</title>
<script type="text/javascript">
function getParent(){
alert(parent.location);
}
</script>
</head>
<body>
<script type="text/JavaScript">
<!--
document.write(parent.loca tion)
//-->
</script>
<br />
IP Address: <cfoutput>#CGI.REMOTE_ADDR #</cfoutpu t><br />
Path:<cfoutput>#CGI.SERVER _NAME##CGI .SCRIPT_NA ME#</cfout put><br />
Query:<cfoutput>#CGI.QUERY _STRING#</ cfoutput>< br />
</body>
</html>
What I am wanting to do is save the javascript variable to a coldfusion variable.
say using <cfset javaid = ?> Any help is appreciated.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Main</title>
<script type="text/javascript">
function getParent(){
alert(parent.location);
}
</script>
</head>
<body>
<script type="text/JavaScript">
<!--
document.write(parent.loca
//-->
</script>
<br />
IP Address: <cfoutput>#CGI.REMOTE_ADDR
Path:<cfoutput>#CGI.SERVER
Query:<cfoutput>#CGI.QUERY
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try using cfwddx.
I've requested that this question be deleted for the following reason:
The question has either no comments or not enough useful information to be called an "answer".
The question has either no comments or not enough useful information to be called an "answer".
> save the javascript variable to a coldfusion variable
The answer is ID: 37783271 - you can't.
Client side code executes after server side code is finished. To run more server side code you must submit a new request.
The answer is ID: 37783271 - you can't.
Client side code executes after server side code is finished. To run more server side code you must submit a new request.