Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Jul 2004
    Posts
    3
    Member #
    6907
    Hi all,

    I am in need of assistance. I have a webpage where when you click on a particular picture(in the art gallery) that picture opens up in a new window. I was wondering how can I disable the address bar and buttons. I know there is a way to do it in java, but I am a novice when it comes to that code.

    Anyhelp you can provide would be greatly appreciated.

    Thanks

    Cdnvanguard

  2.  

  3. #2
    Senior Member kevind_2007's Avatar
    Join Date
    Sep 2003
    Location
    South Carolina
    Posts
    586
    Member #
    3059
    This is javascript, but it is easy to follow.
    HTML Code:
    NewWindow(mypage,myname,w,h,scroll,pos,loc,dir,menub,resize)
     1. mypage = this.href (always this same value)
    2. myname = name of window
    3. w = 450 - width of window
    4. h = 450 - height of window
    5. scroll = values are yes or no - scrollbars
    6. pos = values are center or leave blank('') - position of window
    7. loc = values are yes or no - location bar
    8. dir = values are yes or no - directories
    9. menub = yes or no - menu bar
    10. resize = yes or no - allow resize of window
    Those are the definitions for the code..Here is the code
    HTML Code:
    <a href="http://www.mysite.com" onclick="NewWindow(this.href,'my site','460','450','no','','no','no','no','no');return false" onfocus="this.blur()">My Site</a>
    Of course you can edit the stuff in blue.

    Let me know if this works!
    --Kevin
    15" MacBook Pro With: Mac OSX 10.4.11(Tiger) 1440x900 Windows XP SP2 3GB RAM 1TB HDD
    kevind_2007--"Never let the fear of striking out get in your way."--Babe Ruth

    Links:Firefox Download||Google|| HTML Help||DHTML|| Web Design Terminology||Good-Tutorials

  4. #3
    Junior Member
    Join Date
    Jul 2004
    Posts
    3
    Member #
    6907
    I'm having problems making it work. Like I stated earlier I am pretty new at this stuff. Let me clarify and you can help me out here.

    I have a picture called angelica.jpg when I click on it I want a new window to pop up and show the page angelica.html. This new page would have no address bar or anything. How would the setup code work. I've been fooling around with yours and can't seem to make it work. Any more help you can provide would be greatly appreciated.

    Cdnvanguard

  5. #4
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    This is how the code works. Look at this line, then look below for what each argument/thing is for:
    HTML Code:
    NewWindow(mypage, myname, w, h, scroll, pos, loc, dir, mbar, resize)
    1. mypage = this.href (always this same value)
    2. myname = name of window
    3. w = 450 - width of window
    4. h = 450 - height of window
    5. scroll = values are yes or no - scrollbars
    6. pos = values are center or leave blank('') - position of window
    7. loc = values are yes or no - location bar
    8. dir = values are yes or no - directories
    9. mbar = yes or no - menu bar
    10. resize = yes or no - allow resize of window

    From here, this is an example:
    HTML Code:
    <a href="http://www.mysite.com/image.jpg" onclick="NewWindow(this.href,'my site','460','450','no','','no','no','no','no'); return false;" onfocus="this.blur();">My Site</a>
    Basically, the guy filled in values for each argument to change how the window will pop-up. The onFocus isn't really needed, though.

    I'm not sure if all of his code is correct, I'm just assuming how I fixed it would work. A few parts of his code had visible errors.

    NOTE: This is javascript, not "java".


  6. #5
    Member Nickhead's Avatar
    Join Date
    Jul 2003
    Location
    Pittsburgh, PA
    Posts
    81
    Member #
    2221
    ok

    <a href="#" onClick="window.open('yourdocument.html','Sample', 'toolbar=no,width=324,height=159,left=200,top=200, status=no,scrollbars=no,resize=no');return false">

    This is the format i have used on one of my sites. It's the same thing as what everyone else has offered but maybe a little easier to understand. I dunno. Try it out.

    Im not sure exactly why the "#" is there or what it's story is, but it works well.

    -nick
    Nickhead
    musicpitt.net

  7. #6
    Junior Member
    Join Date
    Jul 2004
    Posts
    11
    Member #
    6679
    Hi,

    just thought i'd add a little to the previous post to polish it up a bit! :bandit:

    <a href="yourLargeImage.jpg" width="150" height="200" target="newwin" onClick="window.open('yourLargeImage.jpg', 'newwin', config='width=150, height=200, toolbar=no, menubar=no, scrollbars=no, resizeable=no, location=no, directories=no, status=no,'); return false"><img src="yourThumbnailImage.jpg" width="75" height="100" border="0" alt="click to view large image"></a>

    This should open a small window exactly the size of your image as oposed to a new full sized window!

    Obviously code marked in red should be customised accordingly!

    PS. The <a href="yourLargeImage.jpg" is there as back-up for users that have JavaScript disabled; the image will still load on a new full sized window!

  8. #7
    Member Nickhead's Avatar
    Join Date
    Jul 2003
    Location
    Pittsburgh, PA
    Posts
    81
    Member #
    2221
    ?

    Do you want it in an html document or just the jpg. Do you have a caption or something?
    Nickhead
    musicpitt.net

  9. #8
    Junior Member
    Join Date
    Jul 2004
    Posts
    3
    Member #
    6907
    Thanks for your help Nick.

    I basically want it too bring up a webpage which shows the artwork and has a close window button so you can close the window. SO long answer short this will be opening an html page with the pict


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:26 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com