![]() |
Images
How does one get an image to open in a new window (globally) after clicking on it?
There is a setting, I have seen it but forgotten... Thanks again... |
In HTML you would use something like this:
HTML Code:
<a href="http://www.site.com/pic.jpg" target="_blank"> http://www.w3schools.com/tags/att_a_target.asp A more elegant method is by JavaScript, but it also has it problems. Code:
window.open(filePath + 'image.jpg','','width=640,height=480') HTML Code:
<a href="#" onClick="window.open('image.jpg', '_blank', 'width=640, height=480,scrollbars=no');"><img src="image.jpg" /></a> |
Is there no setting within vB ACP?
We have images stored within threads and articles and a user clicks on the images and they open up in the same window. The user then closes the image but this then closes the site. tbworld, you are a wizard... I have all problems solved for the moment... The javascript element of which you are talking about is unnecessary.. I do not want to complicate this effort right now, it as taken me an age to get to this stage.. But, have to say, I am tempted by your more elegant method...I look forward to your pending attachment....:up: |
The examples are simple methods and you can see examples of this throughout vBulletin code. What I was trying to show, is that it does not require extensive coding to do something simple. Most users just want to do something simple. :)
|
In your ACP --> Attachments --> Attachment Manager, there is checkboxes for each attachment type, to select to open in a new window.
|
Quote:
STAR |
All times are GMT. The time now is 07:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|