Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Select box

Posted on 2006-10-22
6
Medium Priority
?
232 Views
Last Modified: 2010-04-09
Hi

Is it possible to display a hint in the contents of a select box ?
For example the details of the current option but before the user click it...

Thanks in advance.
0
Comment
Question by:CodedK
  • 4
  • 2
6 Comments
 
LVL 41

Accepted Solution

by:
HonorGod earned 800 total points
ID: 17783987
If you use the title attribute, this "may" do what you want.  For example:

<select>
  <option title='This is a test'>one</option>
  <option title='This is something else'>two</option>
  <option title='Are you kidding?'>three</option>
</select>

  If you click on the selection list, and hold the cursor over one of the entries (e.g., "one"), then the hint/tip message in the title attribute is displayed.  If this isn't what you want, please be more specific.
0
 
LVL 16

Author Comment

by:CodedK
ID: 17784299
Thank you HonorGod... There is a problem.. It works in FF but not in IE.
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 17784574
Ah.  checking
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 41

Expert Comment

by:HonorGod
ID: 17784578
Hm.  Apparently, IE only wants to use titles in a limited number of instances.  How about this?
Changing the status message line (bottom of the browser) based upon the value of the current title?
---------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Select Tip </title>
<script type='text/javascript' src='../objDisplay.js'></script>
<script type='text/javascript'>
  function chgTitle( obj ) {
    var child = obj.selectedIndex;
    var opts  = obj.getElementsByTagName( 'option' );
    var kid   = opts[ child ];
    obj.title = kid.title;
    window.status = kid.title;
  }

  function init( id ) {
    var obj = document.getElementById( id );
    chgTitle( obj );
    obj.focus();
  }
</script>
</head>
<body onload='init("here")'>
<select id='here' onkeyup='chgTitle(this)'>
  <option title='This is a test'>one</option>
  <option title='This is something else'>two</option>
  <option title='Are you kidding?'>three</option>
</select>
<a href='#' title='Is this working?' onclick='return false;'>My link</a>
</html>
0
 
LVL 16

Author Comment

by:CodedK
ID: 17787061
Thank you HonorGod.
Unfortunately i allready use some JS for the onclick of the selected option.

Anyway, thank you for your time and your good answers :)
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 17805759
Thanks for the 'A'
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question