Hey there,

I have a jsp page and a checkbox inside it:

<input type="checkbox" name="some" onchange="test()">Check me</input>

I also have this function:

    function test()
    {
        out.println("checkbox checked status changed");
    }

I want the function test to be invoked every time I check/uncheck my checkbox. It is not working. Since I am not so comfortable with jsp-s, I am not sure if I am using onchange correctly or not, so I do not know if I am actually invoking test() or not... because, if I am invoking test(), then out.println() must not be working.

Anyone please help.

rookie mistake. function test() is a javascript function. No wonder Java object out is not available there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.