Variables in javascript command

F

fiholmbe

Is it possible to execute a javascript with a variable in the actual
command.

Like this for example:

function focusField(pos) {

document.test.POS.focus();

}


I'm a real JS beginner and just cant get something like this to work..

Any ideas?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top