Page 2 of 2 FirstFirst 1 2
Results 16 to 22 of 22

Thread: resizeTo() Method doesn't work on all browsers except safari

  1. #16
    tegwar champ
    United Nations mmi's Avatar
    Join Date
    Oct 2000
    Location
    is everything
    Posts
    7,774
    Quote Originally Posted by Kool Dude View Post
    the browsers kind of changed how they did things over time.
    I assume you have the November 2009 third edition.

    "Until I feared I would lose it, I never loved to read. One does not love breathing." — Harper Lee (Scout, in To Kill a Mockingbird)

  2. #17
    Senior Member
    England coothead's Avatar
    Join Date
    Feb 2003
    Location
    Chertsey, a small town 25 miles south west of London, England.
    Posts
    633
    Hi there c1lonewolf,


    Like with IE and probably every other browser, you create a 400x400 div and position a 1 pixel object at 0,0 and one at 400,400 and you see both objects.
    However, if you you add a solid 1px border to it you lose the 400,400 object.
    It's hidden under the border.
    So in actuality your container has to be 401x401 because the morons can't add a single pixel to the x & y border controls.

    Give me a break!
    Well, this is a very good example of the "inadequate coding skills" to which I alluded.

    When positioning an object, the point of reference is the top left of that object when using top and left.

    However, when using bottom and right, the point of reference is the bottom right.

    Therefore to position a 1px square object to the bottom right of a 400px square div element requires either...
    Code:
     
    element {
        top:399px;
        left:399px;
     }
    
    ...or...
    Code:
     
    element {
        bottom:0;
        right:0;
     }
    
    Of course, novice coders much prefer to berate browsers than admit to their own shortcomings.

    You may now take that break.


    coothead

  3. #18
    hi kool dude,

    i've tried it with the window opened using window.open() method and the resizeTo() method works but not on the window itself. but with this resizeTo() method it gave me an idea to make a script so that i can resize the safari window in different standard sizes i want, just like the web developer add-on on firefox does. i hope that the web developer add-on would also be ported on safari for mac. anyway thank you so much kool dude for your time and knowledge.

  4. #19
    Quote Originally Posted by mmi View Post
    I assume you have the November 2009 third edition.
    hi mmi,

    yes, you're right. this is the book i'm reading right now. because this is the only book i know that i can really understand as a beginner and really don't know anything about javascript. i just based it on the reviews of this book on the amazon that why this is the i picked.

    do you have something in mind that's similar to john pollock's book that's new? i checked the books website and his third edition i think is the last he did.

  5. #20
    Senior Member
    England coothead's Avatar
    Join Date
    Feb 2003
    Location
    Chertsey, a small town 25 miles south west of London, England.
    Posts
    633
    Hi there orrange23,

    ...
    You said that I should concentrate more on learning customer friendly javascript.
    Do you mind sharing what this is?
    ...
    Sorry, but I missed your post with the above question.

    Still, better late than never.

    The following links may possibly provide a little enlightenment...



    coothead

  6. #21
    OK, here is some additional information I found on this:

    The main browser window has security restrictions that prevent resizing due to a lot of misuse by some web sites over time. Thus, almost all browsers disallow resizing the main window (IE may allow this on your computer, where some restrictions are lifted, but does not allow it over the Web. Safari may be doing something similar here, someone may be able to test that out).

    So, resizing the main window, in general, is no longer allowed.

    When using window.open(), most browsers allow the resize of the new window.

    - Modern browsers only allow new windows to be opened by a user click or key press in most cases.

    - IE7+: Pop-up window resizing may not be allowed, depends on settings. IE 8 on XP allowed me to resize a new window offline. Other versions/situations would need to be tested.

    - FF and Chrome allowed the resize offline, would need to test online.

    - Opera only opens the window as a new tab in the main browser window. Thus, it won't allow a resize at all.

    Hope this sheds a little more light on this particular method!

  7. #22
    hi guys,

    thank you very very very much for all your help. with the links and the knowledge about this method. now i'm on the math object chapter. good luck to me because i stink at math that's the reason i got into design. by the way john if you ever need a volunteer in making your next book i'll be glad to help. again thank you guys off to reading chapter 12 i hope this math object is as easy as 123

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Object doesn't support this property or method
    By jhkrs in forum Client-side forum
    Replies: 4
    Last Post: 30th July 2003, 23:26
  2. Cookie 'doesn't support property or method'
    By GSHelpBoy in forum Client-side forum
    Replies: 2
    Last Post: 16th December 2001, 00:12
  3. Doesn't work on some browsers....
    By TupacLivesOn in forum Client-side forum
    Replies: 4
    Last Post: 12th June 2001, 21:34
  4. Doesn't work on some browsers....
    By TupacLivesOn in forum General Computing Forum
    Replies: 2
    Last Post: 1st June 2001, 20:45
  5. Replies: 2
    Last Post: 6th April 2001, 14:53

Tags for this Thread

Bookmarks

Posting Permissions

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