SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: scrollbar does not appear!
-
Jul 30, 2002, 02:16 #1
- Join Date
- Jul 2002
- Location
- Switzerland
- Posts
- 45
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
scrollbar does not appear!
ok I created a javascript which opens up a new window and leads to a new page. now in the old browser version there is no scrollbar! alotugh I added scrollbar="yes". what can I do?
-
Jul 30, 2002, 03:24 #2
Which browser version? And I think it's scrollbars -- try that.
GDrupal Development -- Hire me!
Drupal Training | Darwin Awards Moderator | Classic Cars
SitePoint | Blog | Rent Games Online | Car | Talent
-
Jul 30, 2002, 04:24 #3
- Join Date
- Jul 2002
- Location
- Switzerland
- Posts
- 45
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
no I wrote scrollbars in the script :-)
the affected versions are netscape 4.7 and older and explorer below 5.0. I know it's wierd, but a customer wants to work it for all the old browsers.
-
Jul 30, 2002, 04:30 #4
That's really odd! I use this script and it's fine in Netscape -- there may be some subtle difference -- take a look:
<script language="javascript">
function popWin( url, name, width, height, scroller ) {
var outStr = 'height=' + height + ',width=' + width;
if (scroller != 'true') {
outStr = outStr + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no';
}
else {
outStr = outStr + ',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no';
}
window.open(url, name, outStr);
}
</script>
That's the header.
<a href="javascript:popWin('../popwins/software.html', 'Job3', '400', '250', 'false' )">
And an example link. This one works well with Flash too (as in popping windows out of Flash -- many don't handle that.
GDrupal Development -- Hire me!
Drupal Training | Darwin Awards Moderator | Classic Cars
SitePoint | Blog | Rent Games Online | Car | Talent
-
Jul 30, 2002, 07:04 #5
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You may want to change your variable names, as most of the ones you are using are reserved words. Perhaps something like this:
Code:function popWin( url, winName, winWidth, winHeight, scroller )
Code:outStr = (scroller) ? ',scrollbars' : '';
-
Jul 30, 2002, 07:38 #6
- Join Date
- Feb 2002
- Location
- Gatwick, UK
- Posts
- 1,206
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You might need scrollbars=1
Flawless---=| If you're going to buy a pet - get a Shetland Giraffe |=---
-
Jul 30, 2002, 10:58 #7
- Join Date
- Jul 2002
- Posts
- 13
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I have the same problem
Funny that! I came here with exactly the same problem and found this.
In my header I have a link to this .JS file
function openup(newpage, name) {
window.open(newpage, name, "width=500, height=500, scrollbars=yes, resizable=no, toolbar=no, status=no, location=no, menubar=no"); }
Can anyone tell me what i am doing wrong? Many thanks
-
Jul 31, 2002, 00:37 #8
- Join Date
- Jul 2002
- Posts
- 13
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I found this and it seemed to work. Just put it where the link is and that is it.
Maybe someone can let me know if something is wrong with this:
<a href="#" onClick="window.open('www.url.com', 'WindowA', 'width=525,height=400,scrollbars=yes');">
-
Jul 31, 2002, 07:05 #9
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nothing wrong with that. When you think about it, window.open() is a function already. If you make your own function that runs window.open, it's kinda redundant. The only reason to create a function that runs window.open() is if you want to make some of the variables constant, like the width and height. That way you don't have to specify them each time you want to call a popup window.
-
Jul 31, 2002, 09:39 #10
- Join Date
- Jul 2002
- Posts
- 13
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Another thing I discovered today and you probably had the same problem raffael3d, is that I had spaces in this bit of the code:
"width=500, height=500, scrollbars=yes, resizable=no, toolbar=no, status=no, location=no, menubar=no"
When i changed it to
"width=500,height=500,scrollbars=yes,resizable=no,toolbar=no,status=no,location=no,menubar=no");
Everything was OK, the old browsers don't like the spaces
Also thanks beetle but I have decided to use the old way without the spaces as I would have had to change it on most pages where the old way was lined so I only had to chabge that page.
Bookmarks