Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorMarGera332
    • CommentTimeJan 30th 2008
     permalink
    Hey Everyone

    Just wondered if anyone could tell me how this effect is achieved, when an image is clicked on it loads up in a new window that is just above the main page? Is it Javascript that is used, and if it is, could someone direct me to the website where i can get the script?

    http://www.diogoparrinha.net/web.htm

    Thanks for the help
  1.  permalink
    Google lightbox or lightbox 2.0. The one used was customize a little just so you know :)
  2.  permalink
    hi MarGera332 using following function you can open a image in new window
    call it on click even of anyimage like onclick=myPopup2(file-path-to-open);
    function myPopup2(filePathToOpen) {
    window.open( filePathToOpen, "myWindow",
    "status = 1, height = 300, width = 300, resizable = 0" )
    }
    • CommentAuthorgogogob
    • CommentTimeFeb 14th 2008
     permalink
    Take a look at the source... You will see that this clever designer is making heavy use of script libraries.
    Not, incidentally, opening new windows (which is a bit naff).
    I'm afraid there is a steep learning curve for this stuff.

    You could try something less ambitious by either changing the src of an existing ID'd image... document.getElementById("yourid").src="filename.jpg"
    Or... set the contents of a div using innerHTML... document.getElementById("divID").innerHTML="<img src='filename.jpg' width='xxx' height='yyy' />"

    You can address and change the dimensions of a div (or other elements)... document.getElementById("divID").style.width=xx+"px" ... etc (note the use of the style attribute here, this can be rolled into a variable reference)
    Or an image... document.getElementById("yourid").width=xx+"px" (but here width is an HTML attribute of images, strangely, this attribute can't be rolled into a variable)
  3.  permalink
    Account Closed
    Here's a link to LightBox that you might find easier to digest, and apply to your site: http://www.huddletogether.com/projects/lightbox/
Add your comments
    Username Password
  • Format comments as (Help)