Passing var from php to javascript
Posted
by marc-andre menard
on Stack Overflow
See other posts from Stack Overflow
or by marc-andre menard
Published on 2010-03-23T11:01:22Z
Indexed on
2010/03/23
11:03 UTC
Read the original article
Hit count: 323
php
|JavaScript
I try to do something pretty strait... getting php value to javascript
here is the code..
<script language="javascript">
<?php $imagepath = $_REQUEST["path"]; ?>
var whatisthepath = <?php $imagepath; ?>
alert (whatisthepath);
</script>
ALWAYS getting UNDEFINE.... why ?
© Stack Overflow or respective owner