Skip to main content

Make Images open in a popup window

Blogger Logo Grey
All you bloggers on blogspot ,you must have noticed that when you upload any image to blogger,blogger gives you three sizes (small ,medium ,large)and the original sized image is accessible to uses when they click on the image but the image opens in same window thus navigates your readers away from your blog.


One Nice way to avoid this is to use target="_blank" within your images anchor tag so that your images open in new window.But why not add a little frill and make the image open in a popup window.

Here,s an Example HTML code for any image


What you have to do is ADD :

target="_blank" onclick="window.open(this.href, 'popupwindow', 'width=420, height=350, resizable=no, scrollbars=yes, menubar=no, toolbar=no, status=no'); return false;

after the closing double quotes enclosing the url of the original image, but before the > tag.So that result will be like this-



Let me Explain all the elements one by one.

width=520, height=520 Defines the size of the popup window

resizable=no, scrollbars=yes, menubar=no, toolbar=no, status=no are optional attributes, you can change their values to yes or no according to your needs

For demo click on the grey blogger logo (above) accompanying this post.

the target="_blank"  makes the link open in a new window

you can add the attributes top= and left= to define the position of the pop-up window

Here's an example:

    target="_blank" onclick="window.open(this.href, 'popupwindow', 'width=420, height=350, resizable=no, scrollbars=yes, menubar=no, toolbar=no, status=no, top=20, left=20,'); return false;"

This would make the window open with a displacement of 20 pixels from the top and left of the screen.
Values can be adjusted according to the requirement and will.

Like this article -you can view more of my posts on Images 

Previous post- Use Jquery to style your external Links
                        Image hovering by changing opacity

Comments

  1. really nice post!
    I was searching sor this!
    very useful.

    Thanks!

    ReplyDelete
  2. Thanks Man !!
    Your Post Help Me Alot . Very Very Very Nice Post .
    Keep Your Good Work On .

    ReplyDelete

Post a Comment


Spam/advertising comments will NEVER BE TOLERATED and will be deleted immediately!

I advise you to also "subscribe to the comment feed" and get email updates when I respond to your question.
Thanks for reading,
Admin

Popular posts from this blog

Best DoFollow Blog directories list for seo

List of Dofollow Blog directories,
Note: some items have profile information some do not, doesn’t matter, they’re all DoFollow Blog directories so submit your blogs to them all.
DOFOLLOW BLOG DIRECTORIES

Bloghop.com
Year Site Created: 2000
Indexed Pages in Google: 103,000
Backlinks in Yahoo: 542,700
PageRank: 6
Link Status: Dofollow
Quantcast Rank: 200,223
Editorial Policy: Yes
Spam in index: No
Submission rules: From the website:
We will reject: Spam blogs, hate blogs, stolen blogs, links to non-blog websites, links to illegal or illicit topics like child pornography. Blogs with under 5 posts are no longer accepted, but they might be waitlisted for later review if they look cool.
Commercial blogs are fine, but they must be “fun and useful.” Because of the huge amount of robot-generated blogs being submitted, blogs with the following will not be approved for listing: Acne, Mesothelioma, Real Estate, Lawsuits, Insurance, Gambling, SEO, Web Marketing, Medical Procedures and En…

Get ip-address widget for your blogger

Here is a unique collection of  IP address widgets which shows your visitors their Ip address,operating system,country,browser and the version of the browser.It is cool thing to display  ip address to your visitor's specially if you have TECH related blog.
Now you can get these any of these widgets and add these to your blogs by following these steps -

Get Ip Address Widget for your blog

1 .Choose any widget they are in different size and shapes,choose any according to your blog requirement.
2. Login to blogger dashboard ,and the click on Layout - > page Elements .
3. ADD a new HTML/Javascript gadget anywhere in your blog.
4. Copy any code from below(all are working) and paste in to HTML / Javascript gadget and then save your gadget.
5 Done,Your widget is Now live


1 .Square Ip Address Widget (Height=125px, Width=125px)<!--Ip Address Widget Starts--><span style="display: block; text-align: center;"><a href="http://myfundoo-blog.blogspot.com">…

27 Photography Blogger Templates for your Photo blog

This collection contain 27 different templates with unique banner unique design to each template, you’ll definitely find a Photography blogger template for you and your blog.The list includes Photoblog and Gallery style Blogger templates that you can use for showcasing your photos and design portfolio.Photo gallery blogger template

Don't forget to check out my previous collection of  33 music style blogger templates themes and xmls and
16 football/soccer blogger templates
1. Tequilas Flamejantes – DarkBlack color, Dark background. Gallery Blogger Templates 4 column, Right sidebar Fixed width, 1 sidebar.Photography Blogger Templates
This template for Gallery, Photo , blogs
DemoDownload 2.Tequilas Flamejantes – lightPhoto Gallery Blogger Templates This template for Photo gallery blogs Fixed width, Right sidebar. Yellow color, Light background. 4 column, 1 sidebar
DemoDownload 3. Photoplus Light Photography Blogger TemplatesFixed width, No sidebar. Light color, White backg…