Noah
2009-09-13, 10:11 AM
Hello there, fellow maplers and programmers. Hopefully some of you guys may help me with this simple piece of code:
function disable_enable(){
document.form.text.disabled= !document.form.text.disabled;
}
What I want to do, is to be able to use this function on several elements. A simple example of what I want the function to do is this:
function disable_enable(id){
document.form.id.disabled= !document.form.id.disabled;
}
Where id is a thing you're allowed to change as you wish. Understand what I mean?
So now the issue is that I don't know how to do this in javascript, as I'm no good with it. Anyone that want to help me with this? Thanks! :chin:
Noah
function disable_enable(){
document.form.text.disabled= !document.form.text.disabled;
}
What I want to do, is to be able to use this function on several elements. A simple example of what I want the function to do is this:
function disable_enable(id){
document.form.id.disabled= !document.form.id.disabled;
}
Where id is a thing you're allowed to change as you wish. Understand what I mean?
So now the issue is that I don't know how to do this in javascript, as I'm no good with it. Anyone that want to help me with this? Thanks! :chin:
Noah