Advertisement

06.13.2008 at 04:22AM PDT, ID: 23482319
[x]
Attachment Details

What part of this image variable needs to be setup client side vs server side?

Asked by Daniish in Web Languages/Standards, JavaScript, PHP Scripting Language

Tags: Javascript, PHP, Firefox 2.0, www.globexposure.net/index.php

Hello,

I'm trying to display an image in my Google Maps Infowindow. To this end i need a little further help setting up this variable:

var info = '<div id="info" style="text-align:left";><img src="travel_pics/"' + id + '"/x_info.jpg" width=150 height=100><h3>' + title + '</h3><br>' + date + '</div>';

In particular i'm having difficulty with this part:
<img src="travel_pics/"' + id + '"/x_info.jpg"

I understand there's an issue because Javascript doesn't know what images are on the server, so this needs to be defined server-side in my php.

Please can you tell me what specifically i need to define in my php script and what needs to go in my javascript to make this work?
(i have attached both my javascript 'index.php' and my php script 'read.php' for your reference).


Many thanks

Start Free Trial
Attachments:
 
index.php
 
 
read.php
 
[+][-]06.13.2008 at 05:04AM PDT, ID: 21777850

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.13.2008 at 05:05AM PDT, ID: 21777858

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Web Languages/Standards, JavaScript, PHP Scripting Language
Tags: Javascript, PHP, Firefox 2.0, www.globexposure.net/index.php
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.13.2008 at 05:11AM PDT, ID: 21777901

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.13.2008 at 05:14AM PDT, ID: 21777924

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.13.2008 at 06:35AM PDT, ID: 21778613

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628