Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
How facebook open a image in the same window ........
Posted

If this isn't what you need, please clarify.

Take a look at this:

http://www.w3schools.com/tags/att_a_target.asp[^]

Or...

Definition and Usage

The target attribute specifies where to open the linked document.
Syntax

Attribute Values
Value Description
_blank Opens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked (this is default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
framename Opens the linked document in a named frame
 
Share this answer
 
v2
Try using some jquery plugins such as Lightbox,etc
 
Share this answer
 
Refer

1. jQuery: How can I show an image popup onclick of the thumbnail?[^]
Quote:

There are a lot of jQuery plugins available for this


Thickbox


LightBox


FancyBox


FaceBox


NyroModal


PiroBox


Thickbox Examples


For a single image



  1. Create a link element ()
  2. Give the link a class attribute with a value of thickbox
    (class="thickbox")
  3. Provide a path in the href attribute to an image file (.jpg .jpeg
    .png .gif .bmp)

2. Image Popup box with jquery[^]
Quote:

you can create a hidden div that would pop up when you click on city.

something along these lines:


HTML
<div class="imgHolder">
    <img src="">
</img></div>

click on city would make popup show up:
HTML
$('.city').click(function(){

    $('.imgHolder').children("img").attr("src", var_image_path)
    $('.imgHolder').show();

});

something like this: http://jsfiddle.net/EMLH3/


i've left the styling part to you, but the basics are in the fiddle.


 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900