By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

scrollbar won't add to popup window

P: n/a
Hello,

I seem to be having trouble with a rather simple problem. I am opening a new
window with the window.open command, and even though I set scrollbar=yes, I
can't seem to get the window to display a vertical scrollbar when the text
exceeds the height of the window i just openned (on a side note, ideally I
would like to just have a vertical scrollbar).

My code follows. Thank you,
~Dari

<table style='border:2px inset;font-size:medium;' cellpadding="5">
<tr>
<td border='0' bgcolor='#EEEEE0' >
<table border="0">
<tr>
<td width="260">
<!--REP_START-->
<a
href='files/New_Text_Document.txt'>New_Text_Document.txt</a><br />
<a href='files/clonelink.gif'>clonelink.gif</a><br
/>
<a href='files/clonelink2.gif'>clonelink2.gif</a><br
/>
<!--REP_END-->
</td>
<td border='0' width="100" align="right">
<!--COM_START-->
<span style="cursor:hand"
onclick="window.open('files/comments/New_Text_Document.txt.html',
'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');"><
a>comments</a></span><br />
<span style="cursor:hand"
onclick="window.open('files/comments/clonelink.gif.html', 'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');"><
a>comments</a></span><br />
<span style="cursor:hand"
onclick="window.open('files/comments/clonelink2.gif.html', 'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');"><
a>comments</a></span><br />
<!--COM_END-->
</td>
</tr>
</table>
</td>
</tr>
</table>
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"darius" <da************@yahoo.com> wrote in message
news:cd**********@news.Stanford.EDU...
Hello,

I seem to be having trouble with a rather simple problem. I am opening a new window with the window.open command, and even though I set scrollbar=yes, I can't seem to get the window to display a vertical scrollbar when the text
exceeds the height of the window i just openned (on a side note, ideally I
would like to just have a vertical scrollbar).

My code follows. Thank you,
~Dari

<table style='border:2px inset;font-size:medium;' cellpadding="5">
<tr>
<td border='0' bgcolor='#EEEEE0' >
<table border="0">
<tr>
<td width="260">
<!--REP_START-->
<a
href='files/New_Text_Document.txt'>New_Text_Document.txt</a><br />
<a href='files/clonelink.gif'>clonelink.gif</a><br
/>
<a href='files/clonelink2.gif'>clonelink2.gif</a><br />
<!--REP_END-->
</td>
<td border='0' width="100" align="right">
<!--COM_START-->
<span style="cursor:hand"
onclick="window.open('files/comments/New_Text_Document.txt.html',
'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');">< a>comments</a></span><br />
<span style="cursor:hand"
onclick="window.open('files/comments/clonelink.gif.html', 'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');">< a>comments</a></span><br />
<span style="cursor:hand"
onclick="window.open('files/comments/clonelink2.gif.html', 'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');">< a>comments</a></span><br />
<!--COM_END-->
</td>
</tr>
</table>
</td>
</tr>
</table>


Try the plural: "scrollbars=yes"
Jul 23 '05 #2

P: n/a
> Try the plural: "scrollbars=yes"


Sorry, that didn't help.
Jul 23 '05 #3

P: n/a
darius wrote:
Try the plural: "scrollbars=yes"

Sorry, that didn't help.


"scrollbars" not "scollbars"

Besides, you should not need to declare them, they should appear when
needed by default.
Mick
Jul 23 '05 #4

P: n/a
darius wrote:
I seem to be having trouble with a rather simple problem. I am opening a new
window with the window.open command, and even though I set scrollbar=yes, I
can't seem to get the window to display a vertical scrollbar when the text
exceeds the height of the window i just openned (on a side note, ideally I
would like to just have a vertical scrollbar).
[...]

<table style='border:2px inset;font-size:medium;' cellpadding="5">
<tr>
<td border='0' bgcolor='#EEEEE0' >
<table border="0">
<tr>
<td width="260">
<!--REP_START-->
<a
href='files/New_Text_Document.txt'>New_Text_Document.txt</a><br />
<a href='files/clonelink.gif'>clonelink.gif</a><br
/>
<a href='files/clonelink2.gif'>clonelink2.gif</a><br
/>
<!--REP_END-->
</td>
<td border='0' width="100" align="right">
<!--COM_START-->
<span style="cursor:hand"
onclick="window.open('files/comments/New_Text_Document.txt.html',
'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');"><
Should be scrollbars=yes. toolbar=no and menubar=no are the defaults,
thus they can be omitted (making the code easier legible).
a>comments</a></span><br />
<span style="cursor:hand"
onclick="window.open('files/comments/clonelink.gif.html', 'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');"><
a>comments</a></span><br />
<span style="cursor:hand"
onclick="window.open('files/comments/clonelink2.gif.html', 'NewWindow',
'height=400,width=500,scollbar=yes,toolbar=no,menu bar=no,resizable=yes');"><
a>comments</a></span><br />
<!--COM_END-->
You may want to stop this nonsense of abusing span elements as links
and using "a" elements without both "href" and "id" attribute.

<http://validator.w3.org/>

And since the code shows a pattern, it would be wise to define a method:

function popup(sURI)
{
var w = window.open(
sURI,
'NewWindow',
'height=400,width=500,scrollbars=yes,resizable=yes ');
return !w;
}

<a href="files/comments/New_Text_Document.txt.html"
onclick="return popup(this.href);">comments</a><br/>
...
</td>
</tr>
</table>
</td>
</tr>
</table>


So let me get this straight: You have a table that contains *one* row that
contains *one* cell that contains *one* table that contains *one* row that
contains *two* cells?

You may want to install Brain 1.0 before coding. A table is a table is a
table. [psf 3.8] Never ever use tables for layout purposes alone. Use CSS
instead. And if you have lists, do not abuse the "br" element but use list
elements like this (remove line-wraps within attribute values for XHTML):

<div style="border:2px inset; background-color:#fff; color:#000;
font-size:medium;">
<ul style="width:260px; float:left; margin-right:5px; list-style:none">
<li><a ...>...</a></li>
<li>...</li>
</ul>

<ul style="width:100px; float:left; list-style:none">
<li style="text-align:right"><a ...>...</a></li>
<li style="text-align:right">...</li>
</ul>
</div>

(You may want to learn CSS and use a document-global stylesheet instead of
the "style" attributes.)
HTH

PointedEars
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.