By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,574 Members | 1,568 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,574 IT Pros & Developers. It's quick & easy.

Making a Pop-up window for a image

P: 24
I am trying to like a image so when you click on it, it will make a pop-up widow with a bigger image.

this is what i have and has work on a few other images but no this one.....

<a href="javascript:void'popup.php4?subdir=wedding&imname=WED0 40&desc=Natural lattice 3 paneled screen 7' x 90&quot;','','menubar=no,status=no,location=no,too lbar=no,scrollbars=no,width=607,height=710')">
<img src="images/equipment/wedding/100pix/WED040.jpg" alt=""></a>

thank you in advance
Jun 21 '07 #1
Share this Question
Share on Google+
4 Replies

Expert Mod 15k+
P: 16,027
It won't work because the URL has 7' in it. This will cause the single quote string to terminate after which you have some more content. Escape quotes within quotes:
Expand|Select|Wrap|Line Numbers
  1. 7\'
Jun 22 '07 #2

P: 24
that fixed the problem, thank you for you help
Jun 22 '07 #3

Expert Mod 15k+
P: 16,027
You're welcome. Glad you got your problem solved.
Jun 22 '07 #4

P: 54
Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:imgPopup(imgSrc')">Link Here</a>
  3. function imgPopup(imgSrc) {
  4. img = new Image()
  5. img.src = imgSrc
  6. var img_width = img.height
  7. var img_height = img.width
  8. var popup ='','Popup','toolbar=no,height=' + img_height + 'width=' + img_width + '')
  9. popup.document.body.appendChild(img)
  10. }
There´s a simple code for future use if anyone need to make a popup that fits exactly the image!
Jun 22 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.