472,958 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 8293
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.