Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Question on select tag

 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<select name="number">
<option value=0 selected> zero </option>
<option value=1> one </option>
<option value=2> two </option>
<option value=3> three </option>
<option value=4> four </option>
<option value=5 selected> five </option>
<option value=6> six </option>
</select>
Does it return an error? If not, which one of zero or five is selected?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TRY IT AND FIND OUT!!! HOW HARD IS THAT!!! SOUNDS LIKE ANOTHER TYPE OF QUESTION TO ME!!!
 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know it is not hard. But I do not have a http server.
If you do not want to answer or not know the answer, just igore it.
 
Marshal
Posts: 67366
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not need an HTTP server to test this. Simply open the page in a browser.
bear
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open Note Pad
type in
<select name="number">
<option value=0 selected> zero </option>
<option value=1> one </option>
<option value=2> two </option>
<option value=3> three </option>
<option value=4> four </option>
<option value=5 selected> five </option>
<option value=6> six </option>
</select>
save as
HMMMMMMMM.HTML
on your desk top
close notepd
goto your desk op and click on the icon that says HMMMMMMMM
You will see you answer bright and clear.....
Eric
 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys.
 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have changed my HTML a little bit by adding two buttons:
<html>
<body>
<select name="number">
<option value=0 selected> zero </option>
<option value=1> 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>
</select>
<input type="submit" value="Submit" name="submit"/>
<input type="reset" value="Reset" name="reset"/>
</body>
</html>
How can I send what I selected in the dropdown by pressing the Enter key?
Thanks for any helps!
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you really need to read up on this stuff
http://www.webreference.com/programming/javascript/hform/
 
Jane Somerfield
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,
Thanks for the link. Do you know where I might find some
sample code that handles the Enter key press event?
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www10.brinkster.com/A1ien51
Look under the script library for key code
 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!