• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

select & focus method in selection lists

 
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone,
I am trying to use the focus methods and select methods in a selection list.
below is the code for everyone to help me see why it does not highlight the wages when i click yes or no.

some words may be spelled differently to be shown on javaranch.
Davy
[ April 21, 2004: Message edited by: Davy Kelly ]
[ April 21, 2004: Message edited by: Davy Kelly ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onclick="document.myForm.wages.focus();"
you do not use select like that
Eric
[ April 21, 2004: Message edited by: Eric Pascarello ]
 
Davy Kelly
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric,
You know I am doing distance learning, I have done java and now on the javascript part.
the code i have above is direct from what they are teaching me, but the material is made by a differnt company, they just use the program, if you get what i mean.
so what I did is straight from the material, so I don't understand what you mean by you don't use select like that?
davy
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from my knowledge, I do not think there is a select() built-in function
there is: document.forms[0].dropDownName.selectedIndex = 1
 
Davy Kelly
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I have emailed my distance learning tutor, to see what he says.
but I have done the one you mention above.
Davy
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no slect method on "SELECT" element
2 select methods exist:
1.Highlights the input area of a form element on TEXTAREA and INPUT
2.Makes the selection equal to the current object - on TextRange and controlRange
 
Evildoers! Eat my justice! And this tiny ad's justice too!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic