Dynamically Resize A Browser Window....

Javascript help

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 69162 Views - Last Post: 10 March 2009 - 06:49 PM

#16 devian  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 27-April 03

Re: Dynamically Resize A Browser Window....

Posted 04 June 2003 - 05:35 AM

SlashRaid, on Aug 29 2002, 08:04 AM, said:

In theory, wouldn't then be possible to have a large amount of content that would cause the window to be sized out side of the viewable screen width and length?

To me, I would thing you'd want to size the content with a standard size window that you know the user will be able to view.

What type of content is it? Images? What sizes do you anticipate?

that is a good point, and would me massively annoying to the users. :(
Was This Post Helpful? 0
  • +
  • -

#17 .sva  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 33
  • Joined: 26-May 03

Re: Dynamically Resize A Browser Window....

Posted 23 June 2003 - 12:36 PM

smckone, on Aug 28 2002, 04:44 PM, said:

// resize the current window to the specified width,height
parent.resizeTo(width,height);


is there any way to restore the browser window to the users prefered size?
Was This Post Helpful? 0
  • +
  • -

#18 Jayen  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 12
  • Joined: 04-May 04

Re: Dynamically Resize A Browser Window....

Posted 22 November 2004 - 09:52 AM

Just thinking out loud here so this may be way off, but can you place an empty named DIV at the end of the displayed info, then pick up to 'top' value of the DIV. That will give you the depth of the page (less DIV) and you could resize based on that. Use an onload option to ensure everything is loaded...
Was This Post Helpful? 1

#19 phanindra  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 11-June 06

Re: Dynamically Resize A Browser Window....

Posted 11 June 2006 - 11:45 PM

View Postklewlis, on 29 Aug, 2002 - 07:18 AM, said:

skape999, on Aug 29 2002, 09:12 AM, said:

I could do that, but it would be a painstaking process, that is why I am looking for a script that can recognize the dimensions and handle the resizing on its own. I'm not even sure its possible due to my inexperience with scripting, hence my journey to dreamincode.net.

personally, I'd pick server-side over javascript wherever possible. It's not painstaking at all (unless you aren't familiar with the server-side language). And also, then you could format the info in any way you desire. Then just pass the values back into the javascript for the window resize, and you're all set!



Yes, This is the good solution passing values from serverside to script. its an easy solution too..
Was This Post Helpful? 0
  • +
  • -

#20 snoj  Icon User is offline

  • Married Life
  • member icon

Reputation: 84
  • View blog
  • Posts: 3,564
  • Joined: 31-March 03

Re: Dynamically Resize A Browser Window....

Posted 04 May 2007 - 11:48 PM

Sorry to "dig" this up. But I know of a way to get the numbers needed to resize a window to the size needed. Just use Javascript's DOM offsetHeight property.

Internet Explorer
Mozilla/Firefox
Was This Post Helpful? 0
  • +
  • -

#21 Arbigi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-March 09

Re: Dynamically Resize A Browser Window....

Posted 10 March 2009 - 06:49 PM

View Postskyhawk133, on 29 Aug, 2002 - 08:30 AM, said:

Well, using a little serverside and a little javascript, I can picture someone counting the words or counting the <br>'s or <p>'s or whatever and based on that multiplying $x pixels by $y lines/words/whatever to figure out aprox how big the window should be.

Does the server you are running this on have access to PHP and if you give me an example of one of the pages so I can see the code or how you are displaying it I could better suggest a solution.


Might he be able to use all client-side scripting, by feeding the return into an array, separated as you describe, then stepping through it, doing a count? He could multiply the count value and the pixel value, feed the result into a variable, and use the variable as the length value.

I'm something of a novice, so this advice is worth exactly what you paid for it!
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2