# Javascript question

**URL:** https://forum.kirupa.com/t/javascript-question/228000
**Category:** Uncategorized
**Created:** [June 4, 2007, 2:51pm UTC](https://forum.kirupa.com/t/javascript-question/228000 "2007-06-04T14:51:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Duck](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@Duck](https://forum.kirupa.com/u/Duck)
#### Post date: [June 4, 2007, 2:51pm UTC](https://forum.kirupa.com/t/javascript-question/228000/1 "2007-06-04T14:51:53Z")

</div>

Hi,  
Im trying to make a script work with vars i send with the html.  
In this example naam = 4 and naam2 = s\_sQuestion4  
Problem is this aint working at all it gives me undefined parameters. Im pretty sure i have forgotten something so please help me out.

- Thanks  
Dlate

Javascript:

```auto
function textfieldCheck(naam, naam2) {
	if (document.form.naam2[naam].checked == 1) {
	document.form.s_sQuestion4_text.disabled = false 
	}
}

```

Html:

```auto

onClick=\"textfieldCheck('5','s_sQuestion4')

```
