DropDownlist Problems

Joined
Jan 8, 2006
Messages
4
Reaction score
0
Hi.. I'm actually having a problem wif my drop down list.
I have to make a user control drop down list. Simply put it javascript.
It is stated that it derives from a list box.

So now, i can make the list box and the images appear.

But they are in list box style.
(There is an up and down arrow)

How do i make it in drop down list style?
(1 down arrow ONLY)

Pls help me. I need this.
 
Is this something you are trying to do in an HTML webpage with Javascript?
 
Erm... I'm trying it in an asp.net page..

Here's the codes:


<script language="javascript">

function lc(e,v) {
document.getElementsByName(e)[0].value= v;
}

function expand(s)
{
var td = s;
var d = td.getElementsByTagName("div").item(0);

}

function collapse(s)
{
var td = s;
var d = td.getElementsByTagName("div").item(0);

}

</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="frmddlList" method="post" runat="server">
<div class="dropdownlist1" id="listbox1" style="BORDER-TOP-WIDTH:1px;BORDER-LEFT-WIDTH:1px;BORDER-BOTTOM-WIDTH:1px;OVERFLOW:auto;WIDTH:100px;HEIGHT:40px;BORDER-RIGHT-WIDTH:1px">
<input type="hidden" name="listbox1">
<table>
<tr onclick="lc('listbox1',1)">
<td><img src="img1.gif">text1</td>
</tr>
<tr onclick="lc('listbox1',2)">
<td><img src="img2.gif">text2</td>
</tr>
<tr onclick="lc('listbox1',3)">
<td><img src="img3.gif">text3</td>
</tr>
<tr onclick="lc('listbox1',4)">
<td><img src="img4.gif">text4</td>
</tr>
</table>
</div>
</form>
 
Any clues as to how to do this.

Basically i have to put custom images or bullets or icons in a drop down list using javascript. Any suggestions as to how to come about doing it. I have seen examples of images OUTSIDE the drop down list. But i want it inside the drop down list using javascript. I really am looking forward to a solution. Thank you guys for helping out.
 
Back
Top