Jump to content

any php, js , PEAR expects here that can help me?


friedice

Recommended Posts

 

friedrice is on a distinguished road

 

 

Join Date: Mar 2010

windows 7 professional

10 posts

melbourne

Philippines au victoria

 

 

  friedrice is online now Report Post 

 

any php, js , PEAR expects here that can help me?

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

 

[attachment deleted by admin]

ya it is installed i presummed since all other functions are workin like the sql statements are fine, its jsut the gmap thing. 

and also i cant just call the js in php since its on different files .php and .tpl but on the same page

i tried using sessions but i couldnt get it to work im using PEAR templates

 

thx for ur replies

well im sure php is installed on the server since its a university server plus all other php stuff i used on other parts on the website works fine like rego and dynamically drop down boxes..

wat do u mean just incase and is there a way to check?

im guessin is dat js is not registering dat php variable since both are different server and client side tools.

also wat im thinkin is dat if im unable to resolve it maybe i can just use the js script for gmap which is pretty long in side php echo but it doesnt folow the PEAR template in my understandin

or is it alright to include js in .php instead of .tpl since its part logic and presentation wise

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.