hello friends
i am in deep trouble during the programming i need to view the value generated in javascript function in the php code,i am viewing the snapshot of the code.................
<html>
<head>
<script language="javascript">
<!--
function hello
{
temp=10
}
-->
</script>
</head>
//function being called by some event
now i like to use the php code in the same form and like to use the temp in the php code.
can i do this.
plz .do help me i need it very urgently
can i view the value in javascript function with php code???
Moderator: General Moderators
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India
-
markbeadle
- Forum Commoner
- Posts: 29
- Joined: Tue Dec 02, 2003 2:50 am
- Location: Aachen, Germany
You cannot get the javscript value within PHP without reloading the page and storing the value (hidden input field within a form for example).
Once the SERVER has built a PHP page thats it. No changes.
Javascript is Client Based which means it does not send information back to the server for reprocessing. If you need to change information you have to change all information in javascript which does not contact the server, or reload the page passing values through POST or GET variables for use with PHP.
Hope that makes the situation clearer.
Once the SERVER has built a PHP page thats it. No changes.
Javascript is Client Based which means it does not send information back to the server for reprocessing. If you need to change information you have to change all information in javascript which does not contact the server, or reload the page passing values through POST or GET variables for use with PHP.
Hope that makes the situation clearer.
- softsolvers
- Forum Commoner
- Posts: 75
- Joined: Fri Feb 13, 2004 4:26 am
- Location: India