Received: from bush.rutgersinsurance.com (rutgersinsurance.com [38.138.71.194]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2CKIFx60001 for ; Mon, 12 Mar 2001 15:18:15 -0500 (EST) (envelope-from aalang@rutgersinsurance.com) Received: from cc375098a.glou1.nj.home.com (cc375098-a.glou1.nj.home.com [65.1.158.27]) by bush.rutgersinsurance.com (8.9.3/8.9.3) with SMTP id QAA26570 for ; Mon, 12 Mar 2001 16:32:30 -0500 Message-ID: <005d01c0ab31$d68d3720$1b9e0141@glou1.nj.home.com> From: "Adam Lang" To: References: Subject: Re: Javascript & PHP?? Date: Mon, 12 Mar 2001 15:20:10 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Archive-Number: 200103/5 X-Sequence-Number: 189 You are correct. When you are first using $temp, it has no value. You never assigned anything to it. To fix it, put this: > $temp = $currentCombinedRow[15]; file://location of image! before you try to use $temp. ----- Original Message ----- From: "Richie" To: Sent: Saturday, March 10, 2001 12:48 PM Subject: [PHP] Javascript & PHP?? > Hi > > I have a Javascript function which is supposed to open up a seperate > window with an image from the database. The image location is just stored > on the database and it is returned back from the database no problem. Lets > say I assign a variable $temp to be equal to the location. I then create a > link which when the user clicks it will start a Javascript which is > supposed to read the value of $temp and open up a window accordingly. > However all it does is open up a blank window. Here is my script... > > printf(""); > .... > and then somewhere further on.... > > $temp = $currentCombinedRow[15]; file://location of image! > printf("Click for > image"); > > My guess is that the line I give $temp a value is AFTER the Javascript > definition so maybe the Javacript thinks that $temp has no > value yet?? So is this my problem and if so is there any > way around it because Javascript does have to be inside the head doesn't > it? > > Any ideas would be very much appreciated! > > Cheers, > > Richie > ========================================================= > Richie Duggan > Computer Science IV > University College Cork > Eamil : dugganr@student.cs.ucc.ie richie_dug@yahoo.com > Homepage : http://student.cs.ucc.ie/01/dugganr/index.html > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster