might be a solution:
don't use a javascript includepage, instead use the "inline code" method in
a php.includefile, something like this
include "javascript.inc";
where the javascript.inc (js.inc, js.php, javascript.php - your name, your
choice) contains
<script language="javascript">
<!-- hide code
// javascript code and functions
function exampleFuncWithPHPSess() {
var=<?$Session["thingie"];?>;
}
//-- end hiding -->
</script>
the code would then appear "inline" in the php-file put out by the server
(to the client), but you could still have it in a separate file.. and you
get to use php sessions.
Note: I'm new myself to php, so this might be a no-go, but i've done it with
asp, and it's worked in the past..
/morpheo
--- --- --- --- --- --- --- --- --- --- --- --- --- ---
Alfonso Orion X Allende | [EMAIL PROTECTED]
Interface Developer | Kasuar Form & Funktion
http://www.allende.nu/
--- --- --- --- --- --- --- --- --- --- --- --- --- ---
-----Original Message-----
From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
Sent: den 10 april 2002 22:31
To: [EMAIL PROTECTED]
Subject: [PHP] SESSIONS in javascript
Hi,
I got a PHP page where I define a SESSION. I then include a javascript page
where I would like to use the value which is stored in the SESSION. The
problem is that the php tags <? ?> doesn't work in javascript.
Can anyone tell me how to do that?
Regards,
Morten
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php