Click here to Skip to main content
15,890,185 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: What do I need to learn to build my site? Pin
T M Gray30-Apr-10 7:49
T M Gray30-Apr-10 7:49 
QuestionExtract Html table info into PHP Array Pin
nhsal6927-Apr-10 21:40
nhsal6927-Apr-10 21:40 
QuestionHTTPs problem Pin
willington.d27-Apr-10 18:52
willington.d27-Apr-10 18:52 
AnswerRe: HTTPs problem Pin
Moak27-Apr-10 23:15
Moak27-Apr-10 23:15 
GeneralRe: HTTPs problem Pin
willington.d27-Apr-10 23:40
willington.d27-Apr-10 23:40 
AnswerRe: HTTPs problem Pin
T M Gray30-Apr-10 7:51
T M Gray30-Apr-10 7:51 
Questionopen a drop down on enter button Pin
raghvendrapanda26-Apr-10 23:05
raghvendrapanda26-Apr-10 23:05 
AnswerRe: open a drop down on enter button Pin
Ankur\m/27-Apr-10 19:46
professionalAnkur\m/27-Apr-10 19:46 
I don't know if this can be done directly but I have a work around for this.
Here is a sample code. You need to edit a few things to work for your requirement.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Auto-expand SELECT</title>
<script language="JavaScript">
  function ExpandSelect( intSize ) {
	document.getElementById('MySelect').size=intSize;
  }
  </script>
<style>
.blocker {
	position: absolute;
	margin-top: -4px;
	border: 1px solid #000000;
	padding: 5px 5px;
	background: #FFFFCC no-repeat -10px 5px;
}
</style>
</head>
<body>
<b>Please choose a number:</b>
<div class="blocker">
  <select onFocus="ExpandSelect(7);" onBlur="ExpandSelect(1);" 

onChange="ExpandSelect(1);" name="MySelect" size="1" id="MySelect">
    <option value="1" selected>One</option>
    <option value="2">Two</option>
    <option value="3">Three</option>
    <option value="4">Four</option>
    <option value="5">Five</option>
    <option value="6">Six</option>
    <option value="7">Seven</option>
  </select>
</div>
<p> The select box should float over this text
</body>
</html>


But it's not on Enter click.
Does the drop down open up if you press enter anytime/anywhere in the form - in that case call the function on load of the body.
Does the drop down open up if you press enter when the focus is on some control - in that case call the function on key down event of that control.
In both cases, you need to check if 'Enter click' was pressed or not.
That is done using:
JavaScript
if(event.keyCode==13) { }

Another important thing is you need to know the size of the drop-down list.
Do some edits as instructed and you will be able to do what you want.
Hope it helps! Thumbs Up | :thumbsup:
..Go Green..

GeneralRe: open a drop down on enter button Pin
Jayapal Chandran5-May-10 21:43
Jayapal Chandran5-May-10 21:43 
AnswerRe: open a drop down on enter button Pin
Peace ON28-Apr-10 1:47
Peace ON28-Apr-10 1:47 
Question[L] flag dose not work at the RewriteRule Pin
Dimanovsky26-Apr-10 22:24
Dimanovsky26-Apr-10 22:24 
QuestionProblems with Button Click Event Pin
BadKarma26-Apr-10 22:02
BadKarma26-Apr-10 22:02 
AnswerRe: Problems with Button Click Event Pin
BadKarma26-Apr-10 22:42
BadKarma26-Apr-10 22:42 
AnswerRe: Problems with Button Click Event Pin
Peace ON28-Apr-10 1:53
Peace ON28-Apr-10 1:53 
GeneralRe: Problems with Button Click Event Pin
BadKarma28-Apr-10 2:08
BadKarma28-Apr-10 2:08 
QuestionCSS prob re image change [modified] sorted! Pin
Dalek Dave26-Apr-10 11:21
professionalDalek Dave26-Apr-10 11:21 
AnswerRe: CSS prob re image change [modified] sorted! Pin
User 171649226-Apr-10 12:26
professionalUser 171649226-Apr-10 12:26 
GeneralRe: CSS prob re image change [modified] sorted! Pin
Dalek Dave26-Apr-10 12:33
professionalDalek Dave26-Apr-10 12:33 
QuestionASP passing credential to WCF services [modified] Pin
amit k mistry26-Apr-10 8:28
amit k mistry26-Apr-10 8:28 
AnswerRe: ASP passing credential to WCF services Pin
Ravi Bhavnani26-Apr-10 10:21
professionalRavi Bhavnani26-Apr-10 10:21 
GeneralRe: ASP passing credential to WCF services Pin
amit k mistry26-Apr-10 10:46
amit k mistry26-Apr-10 10:46 
QuestionUnable to call 32-bit dll from web service hosted in IIS on 64-bit machine Pin
Jen_in_a_Box23-Apr-10 4:36
Jen_in_a_Box23-Apr-10 4:36 
AnswerRe: Unable to call 32-bit dll from web service hosted in IIS on 64-bit machine Pin
Michel Godfroid26-Apr-10 0:49
Michel Godfroid26-Apr-10 0:49 
GeneralRe: Unable to call 32-bit dll from web service hosted in IIS on 64-bit machine Pin
Jen_in_a_Box26-Apr-10 9:38
Jen_in_a_Box26-Apr-10 9:38 
GeneralRe: Unable to call 32-bit dll from web service hosted in IIS on 64-bit machine Pin
Michel Godfroid26-Apr-10 9:41
Michel Godfroid26-Apr-10 9:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.