Jump to content

Recommended Posts

making Javascript (not java) and PHP talk to each other is somewhat difficult to understand. Since PHP is parsed on the server side, and javascript on the client side, the only way for these two languages to really talk to each other (based on my understanding. I could be wrong) is through post/get variables.

 

One thing you could do is make a hidden form, and set the value to some php value, and then use javascripts HTML DOM functions to get that value, IE

<!-- javascript
element=document.getElementById('hiddenfield').value;
mark1 = new GMarker(new GLatLng(openInfoWindowHtml(element), -75.240867), { icon: blueIcon});

 

and then you would just make the hidden form as such

 

<input type="hidden" value="<?php echo "myvalue"; ?>" />

 

I might have my syntax a little off, but the basic Idea is there. Hope that helps

Link to comment
https://forums.phpfreaks.com/topic/155736-javaphp/#findComment-819815
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.