Connecting Tech Pros Worldwide Forums | Help | Site Map

Javascript popup window for pictures

Familiar Sight
 
Join Date: Mar 2007
Posts: 146
#1: Sep 30 '09
I'm using a Javascript script that displays pictures in a popup window and it works fine except when there's a picture that contains parentheses:

Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:popImage('http://www.mysite.com/gallery/pic1(small).jpg','Pictures')">
  2. <img src='http://www.mysite.com/gallery/thumbs/pic1(small).jpg' width='100' height='75' alt='Picture' >
  3. </a>
Notice the parentheses around the word "small" in the image name? I'm not a Javascript guy, so I guessing that this is what is causing the problem. What is happening is - when I click on the link I get the little image icon of a broken link in the popup window instead of the larger picture.

The popup works fine for pictures that do not contain parentheses in the image name.

Is there a work around for this?

Thanks.

David

ssnaik84's Avatar
Member
 
Join Date: Aug 2009
Location: Bengaluru, India
Posts: 124
#2: Sep 30 '09

re: Javascript popup window for pictures


nothing is wrong in your code till now..
Can you post your javascript function "popImage"?
Reply


Similar JavaScript / Ajax / DHTML bytes