www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Thread: new target window size

  1. #1
    Join Date
    Nov 2005
    Posts
    44

    new target window size

    hi guys

    i was wondering how to make the target="_blank" window a certain size, it allways bugged me, if so where do you desinate it in the code. i want to have the window display a certain size. also is there a way to display a new target window to be full screen as default?


    gavin

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Code:
    <a href="http://www.w3.org/" onclick="window.open (this.href, 'child', 'height=400,width=300'); return false">W3C</a>
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Nov 2005
    Posts
    44
    ok great but i need a scroll bar on the right had side as well?

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Code:
    <a href="http://www.w3.org/" onclick="window.open (this.href, 'child', 'height=400,width=300,scrollbars'); return false">W3C</a>
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Nov 2005
    Posts
    44
    thanks for the help charles its greatly Appreciated


    gavin26er

  6. #6
    Join Date
    Jan 2010
    Location
    Atlanta,GA
    Posts
    53
    charles:

    hi I used your above code, I dont know if it is javascript or not. It looks like it. anyway I used it to have some images open in a new window. They would open in firefox opera and safari. but not in ie 8. pop ups and java script were enabled do you know where I went wrong?

  7. #7
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Post a link to your offending page.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  8. #8
    Join Date
    Jan 2010
    Location
    Atlanta,GA
    Posts
    53
    I am afraid I overwrote my original html files with some javascripts I copied out of a book. I checked with someone and they now open in ie8. I dont know enough about javascript to know the difference. but i am trying to learn....slowly.

    Like I said your script worked in every browser except ie and i dont know why. i thought you might know off the top of your head.

    thanks
    js

  9. #9
    Join Date
    Jan 2010
    Posts
    13
    are you using a software program like dreamweaver or expression? they have plugins that can do this for you easily. and of course making the popup full screen involves making the code _self or _same or _parent

  10. #10
    Join Date
    Jan 2010
    Location
    Atlanta,GA
    Posts
    53
    I am not using dreamweaver I am writing everything from scratch in textwrangler.

    I used these javascripts, and it works in ie8 now. I dont fully understand everything about these scripts, but I am learning.

    <a href="javascript:newWindow('fullsize_htmls/mountains_mo.html')">

    function newWindow(newContent)
    {
    winContent=window.open(newContent,'nextWin','left=105, top=0,height=450,width=850,scrollbars=no,toolbar=no,status=no,menubar=no,location=no,resizable=no')
    }

    Please excuse my ignorance. thanks
    JS

  11. #11
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Don't use that method. It'll make your link fail for vast numbers of users. ( And not work the way you expect on certain versions of MSIE. )
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  12. #12
    Join Date
    Jan 2010
    Location
    Atlanta,GA
    Posts
    53
    I dont know what to use then?

  13. #13
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    I'm pretty sure that you are doing something wrong with the example that I gave.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  14. #14
    Join Date
    Jan 2010
    Location
    Atlanta,GA
    Posts
    53
    I will try it again and give you the link to my website.

    thanks

  15. #15
    Join Date
    Jan 2010
    Location
    Atlanta,GA
    Posts
    53
    Ok, I reloaded your new window commands for 3 of my images. I dont have ie so I can not test it. However, if you would like to see if it works you can go to www.jcs-productions.com. Click on either the ocean, the bulldozer, or the map, those are the links that contain your script. I would really appreciate your input on what is happening.
    thanks
    JS

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