View Single Post
  #1 (permalink)  
Old 20-09-2006, 06:42 PM
tenuk's Avatar
tenuk tenuk is offline
Novice Webmaster
 
Join Date: Jul 2006
Location: K. Lumpur
Posts: 36
Rep Power: 0
tenuk is on a distinguished road
javascript + php

im not talking about ajax

heres my situation.

[file1.html][static html]
Quote:
<!-- first script, variables in java -->
<script type="text/javascript">
user = "xxxxxxx";
###and some other variables###
</script>

<!-- second script, import a script-->
<script language="JavaScript" type="text/javascript" src="file2.php">
</script>
[file2.php]
Quote:
###the mystery is in this file###
Question:
1.How do I print a result from a (php) function in file2.php so that its is shown in file1.html
2.How do I convert the variable to a php variable.

should i use
<? echo "print.document(\"$variable\")"; ?> or
print.document(" <? echo $variable ?>");
__________________
My Blog: http://kay.cesb.net.my
Reply With Quote