|
-
Apr 14th, 2002, 12:02 AM
#1
Help..
Ok, I'm doing a little page using java script and php. Anyway, Ive got a function that is run on the mousedown event of a button..
What I want to know is how to assign a variable in java to a variable in php?
eg:
Code:
function do_co()
{
x=document.form2.x.value
y=document.form2.y.value
z=document.form2.z.value
<?
$co = 'x';
?>
thread_title.innerHTML="<? echo $co; ?>"
}
I want $co to equal the 'x' value in the java script..
Any ideas?
-
Apr 14th, 2002, 07:04 AM
#2
I think you're going about it the wrong way. The scripts cannot be linked directly without asking the webserver for a new page. To do that you could use this code in your header
Code:
x=document.form2.x.value;
document.location = 'mypage.php?co=' + x;
or something like that.
Be more specific, and maybe I could help more....
-
Apr 14th, 2002, 08:10 AM
#3
Fanatic Member
Originally posted by ricmitch_uk
Be more specific, and maybe I could help more....
transferring a variable value from JS to PHP, pretty simple to understand to me
-
Apr 14th, 2002, 03:22 PM
#4
-
Apr 14th, 2002, 11:23 PM
#5
Fanatic Member
Originally posted by ricmitch_uk
Any way is simple, it's just unclear how (s)he wants it done, there are a number of ways.
fair enough, sorry
-
Apr 15th, 2002, 10:32 AM
#6
Don't be.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|