dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Pop Up Window From Image

  1. #1
    Join Date
    Mar 2003
    Posts
    1

    Pop Up Window From Image

    Hello,

    I am not very good at javascript so this script would need to be described in newbie terms :-(

    I am looking for a pop up window script. Basically it is a image pop up script.

    When the user clicks an image of my choise it pops up a window I can choose the size of, url and so forth

    What is the script for this?

    Thankyou for your time

  2. #2
    Join Date
    Mar 2003
    Location
    Mtl, Canada
    Posts
    90
    Ok so you know how to put an image with html
    <img src="somedirectory/picture.gif">
    you just add in that tag:
    onLoad="window.open()"
    it looks like this:
    <img src="somedirectory/picture.gif" onLoad="window.open()">

    now if you leav it like that it will open a blank window
    so to specify the url and size and whatever else

    in the "()" of window.open() you add three series of this single quotes seperated by a comma like this:
    '1','2','3'
    it will then look like this
    window.open(' ',' ',' ')

    now replace #1 with the url you want
    now replace #2 with a name you want to give that page (if you dont want to get fancy, just leave this one empty)
    now replace #3 with stuff like this (you can use 1, 2 or how many you want):
    width=650,height=768,toolbar=1

    and the final result:

    <img src"directory/NameOfYourImage.jpg" onClick="onLoad="window.open('http://www.canadapost.ca/tools/pcl/bin/range-e.asp','','width=650,height=768,top=50,left=25,toolbar=1,menubar=1,scrollbars=1,resizable=1,location =1,directories=1,status=1')">

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles