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

Miles Thompson miles at allnovascotia.com
Wed Sep 13 20:16:05 CDT 2006


At 08:50 PM 9/13/2006, Paul Novitski wrote:

>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
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

Paul,

Thank you.

I've fixed it temporarily by hardcoding the URL; I will have to do some 
string processing for a permanent fix.

Miles 


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.3/446 - Release Date: 9/12/2006





More information about the Javascript mailing list