473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

select box without scrollbar


Is it possible to display the select box without scrollbar
in my program there is a need for that . The code attached below
contains 2 select box and four buttons and the button is used to
interchange the data's in the select box.
(provuide coding for no scrollbar in select box)

Thank You in advance

<htm>
<body>
<form name="listselection">
<center>
<br><br><br><br>

<TABLE BORDER=0>
<TR>
<TD>
<SELECT NAME="list1" id="list1" SIZE=20 style="width:100px;">
<OPTION VALUE="Finance">Finance</OPTION>
<OPTION VALUE="Marketing">Marketing</OPTION>
<OPTION VALUE="Sales & Rep">Sales & Rep</OPTION>
<OPTION VALUE="Shipping">Shipping</OPTION>
<OPTION VALUE="Revenue">Revenue</OPTION>
<OPTION VALUE="Transport">Transport</OPTION>
</SELECT>
</TD>

<TD VALIGN=MIDDLE ALIGN=CENTER>
<INPUT TYPE="button" NAME="right" VALUE=">"
ONCLICK="moverightsingle()"><BR><BR>
<INPUT TYPE="button" NAME="right" VALUE="All >>"
ONCLICK="moverightall()"><BR><BR>
<INPUT TYPE="button" NAME="left" VALUE="<"
ONCLICK="moveleftsingle()"><BR><BR>
<INPUT TYPE="button" NAME="left" VALUE="All <<"
ONCLICK="moveleftall()">
</TD>
<TD>
<SELECT NAME="list2" id="list2" MULTIPLE SIZE=20 style="width:100px;">
<OPTION VALUE="One">One</OPTION>
<OPTION VALUE="Two">Two</OPTION>
<OPTION VALUE="Three">Three</OPTION>
<OPTION VALUE="Four">Four</OPTION>
<OPTION VALUE="Five">Five</OPTION>
<OPTION VALUE="Six">Six</OPTION>

</SELECT>
</TD>

</TR>

</TABLE>
</center>
<form>
</body>
</html>

<script>

function moverightsingle()
{

var x=document.getElementById("list1")
var y=x.options[x.selectedIndex].text
var index=x.selectedIndex;

myOption=new Option();
myOption.text=y;

insertIndex=document.listselection.list2.options.l ength;
document.listselection.list2.options[insertIndex]=myOption;
document.listselection.list1.options[index]=null;
}

function moveleftsingle()
{

var xx=document.getElementById("list2");
var yy=xx.options[xx.selectedIndex].text
var index=xx.selectedIndex

myOption=new Option();
myOption.text=yy;

insertIndex=document.listselection.list1.options.l ength;
document.listselection.list1.options[insertIndex]=myOption;
document.listselection.list2.options[index]=null;

}

function moverightall()
{
var listlength=document.getElementById("list1").length ;

for(var i=0;i<listlength;i++)
{

var x=document.getElementById("list1");
var data=x.options[i].text

myOption=new Option();
myOption.text=data;

insertIndex=document.listselection.list2.options.l ength;
document.listselection.list2.options[insertIndex]=myOption;

}

for(var i=0;i<listlength;i++)
{

var x=document.getElementById("list1")
var y=x.options[0].text
var index=0;
document.listselection.list1.options[index]=null;

}

}
function moveleftall()
{
var listlength=document.getElementById("list2").length ;

for(var i=0;i<listlength;i++)
{

var x=document.getElementById("list2");
var data=x.options[i].text

myOption=new Option();
myOption.text=data;

insertIndex=document.listselection.list1.options.l ength;
document.listselection.list1.options[insertIndex]=myOption;

}

for(var i=0;i<listlength;i++)
{

var x=document.getElementById("list2")
var y=x.options[0].text
var index=0;
document.listselection.list2.options[index]=null;

}

}
</script>
*** Sent via Developersdex http://www.developersdex.com ***
Jan 20 '06 #1
6 8315
rajesh said the following on 1/20/2006 8:13 AM:
Is it possible to display the select box without scrollbar
in my program there is a need for that .
Absolutely.
<SELECT NAME="list1" id="list1" SIZE=20 style="width:100px;">


<select multiple size="20"...>

Voila! No scrollbars.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 20 '06 #2
"Randy Webb" <Hi************@aol.com> wrote in message
news:Pu******************************@comcast.com. ..
rajesh said the following on 1/20/2006 8:13 AM:
Is it possible to display the select box without scrollbar
in my program there is a need for that .


Absolutely.
<SELECT NAME="list1" id="list1" SIZE=20 style="width:100px;">


<select multiple size="20"...>

Voila! No scrollbars.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -

http://www.JavascriptToolbox.com/bestpractices/

He already had MULTIPLE on one of the selects and it doesn't have any
effect under Firefox (and likely other browsers).

No scrollbars under IE as long as "Size=" exceeds the number of options.

Also, the exxisiting logic doesn't support moving multiple items.
Jan 20 '06 #3
McKirahan said the following on 1/20/2006 10:23 AM:
"Randy Webb" <Hi************@aol.com> wrote in message
news:Pu******************************@comcast.com. ..
rajesh said the following on 1/20/2006 8:13 AM:
Is it possible to display the select box without scrollbar
in my program there is a need for that . Absolutely.
<SELECT NAME="list1" id="list1" SIZE=20 style="width:100px;">

<select multiple size="20"...>

Voila! No scrollbars.


He already had MULTIPLE on one of the selects and it doesn't have any
effect under Firefox (and likely other browsers).


There is no scrollbar in Firefox for the code I posted. There is a
placeholder for the scrollbars but no way of "scrolling".
No scrollbars under IE as long as "Size=" exceeds the number of options.
Tell Goober I said "Duh huh". Ever heard of John Boy and Billy?
Also, the exxisiting logic doesn't support moving multiple items.


That wasn't the question I answered.

And please fix your OE so that it quotes properly.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 20 '06 #4
"Randy Webb" <Hi************@aol.com> wrote in message
news:zP********************@comcast.com...
McKirahan said the following on 1/20/2006 10:23 AM:
"Randy Webb" <Hi************@aol.com> wrote in message
news:Pu******************************@comcast.com. ..
rajesh said the following on 1/20/2006 8:13 AM:
Is it possible to display the select box without scrollbar
in my program there is a need for that .
Absolutely.

<SELECT NAME="list1" id="list1" SIZE=20 style="width:100px;">
<select multiple size="20"...>

Voila! No scrollbars.

He already had MULTIPLE on one of the selects and it doesn't have any
effect under Firefox (and likely other browsers).


There is no scrollbar in Firefox for the code I posted. There is a
placeholder for the scrollbars but no way of "scrolling".


My interpretation of the OP was that he didn't want the placeholder.
No scrollbars under IE as long as "Size=" exceeds the number of options.


Tell Goober I said "Duh huh". Ever heard of John Boy and Billy?


IE doesn't show the placeholder;
Firefox does even if "size=" exceeds the number of options.
Also, the exxisiting logic doesn't support moving multiple items.


That wasn't the question I answered.


It wasn't directed at you.
And please fix your OE so that it quotes properly.
Please clarify.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -

http://www.JavascriptToolbox.com/bestpractices/
Jan 20 '06 #5
McKirahan said the following on 1/20/2006 11:45 AM:
"Randy Webb" <Hi************@aol.com> wrote in message
news:zP********************@comcast.com...
McKirahan said the following on 1/20/2006 10:23 AM:
"Randy Webb" <Hi************@aol.com> wrote in message
news:Pu******************************@comcast.com. ..
rajesh said the following on 1/20/2006 8:13 AM:
> Is it possible to display the select box without scrollbar
> in my program there is a need for that .
Absolutely.

> <SELECT NAME="list1" id="list1" SIZE=20 style="width:100px;">
<select multiple size="20"...>

Voila! No scrollbars.

He already had MULTIPLE on one of the selects and it doesn't have any
effect under Firefox (and likely other browsers).

There is no scrollbar in Firefox for the code I posted. There is a
placeholder for the scrollbars but no way of "scrolling".


My interpretation of the OP was that he didn't want the placeholder.


Difference in interpretation then. Fair enough.
No scrollbars under IE as long as "Size=" exceeds the number of options.

Tell Goober I said "Duh huh". Ever heard of John Boy and Billy?


IE doesn't show the placeholder;
Firefox does even if "size=" exceeds the number of options.


True.
Also, the exxisiting logic doesn't support moving multiple items.

That wasn't the question I answered.


It wasn't directed at you.


OK.
And please fix your OE so that it quotes properly.


Please clarify.


See whats below? That is my signature from the post you replied to. OE
does not snip signatures as it should. There is a fix somewhere (I dont
recall where) that fixes that problem. Signatures shouldn't be quoted in
Usenet unless it is the signature itself that is being discussed.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -

http://www.JavascriptToolbox.com/bestpractices/

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 20 '06 #6
"Randy Webb" <Hi************@aol.com> wrote in message
news:fo********************@comcast.com...

[snip]
And please fix your OE so that it quotes properly.
Please clarify.


[snip]
Signatures shouldn't be quoted in
Usenet unless it is the signature itself that is being discussed.


Got it. (Sometimes I get lazy.)
Jan 20 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Don Schneider | last post by:
I tried to setup a frameset which consists of 4 different subframes. Each of these subframes should fetch a different web page from the internet and display it completely (!). BUT: the vertical...
3
by: frodo | last post by:
Hi, I'm new here ( Hi all ), and my problem is: Is possible to change layout of drop-down list made with <select> & <option> tags. I don't like this ugly gray arrow, slider etc. in normal...
1
by: Marek Mänd | last post by:
<select multiple style="height:200px;"> <option>a <option>b </select> Why does Mozilla draw the vertical scrollbar to the SELECT html element? There is plenty of void room below two OPTIONs in...
7
by: Sujan | last post by:
Hello all, Is it possible to remove scrollbar(s) without using frames. Is there any code which could be applied in body tag to remove scrollbar(s). Thanks in adv, Sujan
1
by: rajesh | last post by:
How to invisible the scrollbar in select box OR Drop down box in mozilla. <SELECT NAME="list2" id="list2" MULTIPLE SIZE=20 style="width:100px;"> <OPTION VALUE="One">One</OPTION> <OPTION...
3
by: John Kraft | last post by:
I have a listview control that I want the columns of to remain a proportional size filling the listview completely. In the listview's Resize method, I calculate the new sizes and all looks fine....
1
by: Jenny | last post by:
Dear all, I have one select which lists one visible element. I want this select can show scrollbar after I click its down arrow, so that i can use the scrollbar to select the element i want. ...
1
by: aswinm | last post by:
Hi All, I have a sample page in which I am enclosing a <Select within a DIV, The purpose is to have a horizontal scrollbar for the <Select. The page is working perfectly fine. But I notice that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.