[Javascript] Image popup works, but fails if there is a query string

Paul Novitski paul at juniperwebcraft.com
Wed Sep 13 18:50:03 CDT 2006


At 9/13/2006 01:23 PM, Miles Thompson wrote:
>I have a PHP page with a Javascript image popup function in the 
>area. Page layout is by CSS. You can see it here: 
>http://www.allnovascotia.com/test/sandwichchef/index.php Menu 
>buttons on the side reload the page, and a value passed in the URL 
>controls what is loaded and displayed in the centre column. If the 
>page is loaded with NO query string, just .../sandwichchef/index.php 
>the popup works fine. If Ctrl+R is pressed to reload the page, no 
>problem. If the page is loaded WITH a query string (or one of the 
>buttons is clicked), such as ../sandwichchef/index.php?pgget=1, the 
>popup script executes, but no picture is loaded , just a black box 
>with a missing image symbol. Nothing shows up in the Javascript 
>console. Is the problem the reliance of the popup code on passing an 
>URL, but the browser already has a different query string stored? 
>Here's a link to the main page: 
>http://www.allnovascotia.com/test/sandwichchef/index.phps The 
>included files contain nothing but text. The popup page (popPic.htm) 
>is v. short and is presented below my signature. I'm really puzzled 
>and suggestions / guidance will be most welcome. Regards - Miles 
>Thompson popPic.htm:


I clicked on an image and got a pop-up with a broken image, the 
source of which is:
http://www.allnovascotia.com/test/sandwichchef/index.php./graphics/sandwichTray.jpg

Note the badly-formed URL, e.g. "index.php./"

Paul 




More information about the Javascript mailing list