is it possible??
if it is how is it done?
Using java vars in php?
Moderator: General Moderators
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
php: server-side (almost always)
javascript: client-side
They do not share the same context but you can send the values of javascript variables with a http-request
e.g.
edit: ah, right Java. That could be server-side, too.....
javascript: client-side
They do not share the same context but you can send the values of javascript variables with a http-request
e.g.
Code: Select all
<html>
<head>
<script language="javascript" type="text/javascript">
var posX=1;
var posY=2;
function newRequest()
{
document.location = "http://localhost/test.php?x="+posX+"&y="+posY;
return true;
}
</script>
</head>
<body>
<button onClick="javascript:newRequest()">click</button>
</body>
</html>