hii
my drop down box contains very long names...
if i increase the length of the box it doesn't looks good
so i was wondering if i could somehow show the complete name inthe tooltip or title when the value is selected in the drop down list....

i am picking the values from the database

i read somewhere that title is not supported by w3c..

any suggestions ??
thanks........

Recommended Answers

All 3 Replies

Aashishn86,

You could try this approach. It works in isolation but on a real page would cause the page to reflow as it resizes. Therefore of limited utility.

<html>
<head>
<title>Airshow :: Untitled</title>
<style type="text/css">
{}
</style>

<script>
function expand(s, b){ s.style.width = (b) ? '' : '100px'; }
</script>
</head>

<body>
<select style="width:100px;" onfocus="expand(this, 1);" onblur="expand(this, 0);">
	<option value="1">111111111111</option>
	<option value="2">222222222222222222222</option>
	<option value="3">333333333333333333333333333333</option>
</select>
</body>
</html>

Airshow

thanks
but my form has lots of text boxes and drop downs ....
can't really play with the layout...

I guessed as much.

The problem is - if you allow enough space for it to expand into, then it might as well be full width in the first place!

Maybe someone else has a better idea.

Good luck

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.