I have a code as below:
test1.php:
----------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<script type="text/javascript" src="resources/scriptaculous-
js-1.8.2/lib/prototype.js" ></script>
<script type="text/javascript" src="test1.js" ></script>
</head>
<body>
<?php
// want to be global, but how???
$var = 'test';
?>
<div id="debug"></div>
</body>
</html>
test1.js:
----------
Event.observe(document,'dom:loaded', function() {
new Ajax.Updater('debug','test2.php', {
onComplete: function() {
}
});
});
test2.php:
----------
<?php
echo "var = ".$var;
?>
(http://pastie.org/405875 for better view)
How to make $var to work as global within Ajax.Request ?? Is this
possible ?
Thanks in advance for help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---