Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 25th, 2004, 12:25 PM
Authorized User
 
Join Date: Jun 2003
Location: Barcelona, , Spain.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default opening a window with scrollbars

Hi, friends:

I am trying to open a new window with the window.open() method.
I have the following problem using Internet Explorer:

If I set 'scrollbars=no' I get, as you may expect, a pop-up window with no scrolling facilities.
If I set 'scrollbars=yes' I do get the scrollbar always, even when it is not necessary.
Is there any way to get the scroll bar only if the document loaded needs scrolling?
(This only happens with IE. Netscape and Mozilla browsers only shows the scrollbars if they are necessary)

Thanks in advance

Tomàs Jiménez
OranginaLab
__________________
Tomàs Jiménez
OranginaLab
Reply With Quote
  #2 (permalink)  
Old February 25th, 2004, 12:34 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Never had much luck with this. Is setting scroll=auto in the actual page being loaded an option?

--

Joe
Reply With Quote
  #3 (permalink)  
Old February 25th, 2004, 12:53 PM
Authorized User
 
Join Date: Jun 2003
Location: Barcelona, , Spain.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, Joe:

I'm afraid it doesn't work.
Setting 'scrollbars=auto' has the same effect that setting it to 'no'.
No scrollbars at all.

Thank you, anyway.

Tomàs Jiménez
OranginaLab
Reply With Quote
  #4 (permalink)  
Old February 25th, 2004, 12:58 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

That's not what I suggested. I meant changing the scroll attribute of the page you are loading.

--

Joe
Reply With Quote
  #5 (permalink)  
Old February 25th, 2004, 01:34 PM
Authorized User
 
Join Date: Jun 2003
Location: Barcelona, , Spain.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excuse my ignorance, Joe.

I'm afraid I don't know which attribute you are referring to.
Does it exist a window.scroll property? (I knew about a window.scroll() method but not such an attribute)
Or it belongs to the document object?

How do I change the scroll attribute?

Thank you for your patience.

Tomàs Jiménez
OranginaLab
Reply With Quote
  #6 (permalink)  
Old February 25th, 2004, 03:36 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

When I use this line:

var newWin = window.open("newpage.php","winName","scrolling=aut o");

The new page has scrollbars only if the content exceeds the window size.

I am using IE6. I don't know why your new page has scrollbars...?

----------
---Snib---
----------
Reply With Quote
  #7 (permalink)  
Old February 26th, 2004, 05:36 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Tomàs

This is what I meant:
http://msdn.microsoft.com/library/de...ies/scroll.asp

Snib

Is anything set in the page you are showing?

--

Joe
Reply With Quote
  #8 (permalink)  
Old February 26th, 2004, 06:35 AM
Authorized User
 
Join Date: Jun 2003
Location: Barcelona, , Spain.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That was exactly what I needed!!
My pop up windows will never show scrollbars when not necessary again.

Thank you very much, Joe.

(Snib: I've tried your suggestion but setting "scrolling=auto" made scrollbars disappear completely)

Tomàs Jiménez
OranginaLab
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a New Window GailCG ASP.NET 2.0 Basics 14 April 1st, 2008 11:32 AM
opening a new window rgpassey Javascript How-To 2 September 14th, 2005 11:38 AM
Opening New Window p_nut33 Classic ASP Basics 1 August 6th, 2004 08:11 PM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM
Opening New Window james_sellwood ASP.NET 1.0 and 1.1 Basics 5 June 12th, 2003 11:43 AM



All times are GMT -4. The time now is 12:29 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.