ok im makin a gmap website for a uni subject
its in PEAR templates
problem i can seem to access the php variable in my js script
in test.php
i got
$address= $_POST['address']; which gets it from input in prev page
connected to dat php page is a test.tpl file where all html and js is there
i tried this and all sort of methods
var myVar = "<?php echo $address; ?>";
alert(myVar);
but all it shows it <?php echo $address; ?> in the alert box
i need that address value so i can pinpoint it on a gmap by calling a function like dat
showAddress(<?php echo $address; ?>);return false;
any ideas how to resolve it?
thx
its in PEAR templates
problem i can seem to access the php variable in my js script
in test.php
i got
$address= $_POST['address']; which gets it from input in prev page
connected to dat php page is a test.tpl file where all html and js is there
i tried this and all sort of methods
var myVar = "<?php echo $address; ?>";
alert(myVar);
but all it shows it <?php echo $address; ?> in the alert box
i need that address value so i can pinpoint it on a gmap by calling a function like dat
showAddress(<?php echo $address; ?>);return false;
any ideas how to resolve it?
thx
Attachments
Last edited:
My Computer
At a glance
windows 7 professionalIntel(R) core(TM)2 duo CPU T6600 @ 2.20GHz2.00 GB RAMMobile Intel(R) 965 Express Chipset Family
- Computer Manufacturer/Model Number
- DELL inspiron 1525
- OS
- windows 7 professional
- CPU
- Intel(R) core(TM)2 duo CPU T6600 @ 2.20GHz
- Memory
- 2.00 GB RAM
- Graphics Card(s)
- Mobile Intel(R) 965 Express Chipset Family
- Screen Resolution
- 1280 * 800