open a picture in a new window

  • 1
  • Question
  • Updated 9 years ago
I have figured out how to make it so when you click a button, a new window opens and shows a webpage. But I want to know how to make it open a picture in a new window. I would show the html, but whenever I try to post it, it becomes the output of the code = the button. Help with that to...
Photo of mE

mE

  • 45 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of mE

mE

  • 45 Posts
  • 0 Reply Likes
Never mind I found out how... should have tried stuff before posting a question. Instead of this:

ANY NAME HERE

It was this:

Pic
Photo of mE

mE

  • 45 Posts
  • 0 Reply Likes
I still can't get it to show that actual HTML though....
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hello mE,

For the code to display here on the page so that we can take a look at it, please wrap it in <!-- at the beginning and --> at the end. This will put the code on the page, and not the output.

Emmy
Photo of mE

mE

  • 45 Posts
  • 0 Reply Likes
Thanks Emmy.

What I was going to say was:

Instead of this:

<!-- <a href="#" onclick="window.open('ANY URL','TEXT OF BUTTON ', 'toolbar=no,width=600,height=400,left=20,top=20,screenX=20,screenY=20,status=no,scrollbars=yes,resizable=yes');return false">TEXT OF BUTTON</a> -->

It is this:

<!-- <ahref="#"onclick="window.open('ANY URL/resources/NAME OF PICTURE','Show Picture', 'toolbar=no,width=615,height=744,left=20,top=20,screenX=20,screenY=20,status=no,scrollbars=yes,resizable=no,');return false">Show Picture</a> -->

Also the toolbar = no and the width & height and those other options can be changed too.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Thanks for letting us know your solution. I'm sure others will find this useful.