Javascipt error

Hi All,

I am facing a problem hope you will help me.

The problem is

I have hot-spot button on the form and parallel to that i have put a lnline-image on the form. i wrote a javascript in JS header

function makerequest(frm) {

var status;

frm.status.value = “MAKE_REQUEST”;

alert(frm.status.value);

frm.submit();

}

and i called this function from both click event

like

makerequest(this.form);

it is working fine with Hot-spot button but not working with image. it shows me error status is not an object or not define at javascript.

is there any property has to be set.

?

please help me.

Its an urgent

With Regards,

Vikas

Subject: Javascipt error

I suspect that you invoke the function when it goes wrong with the wrong object. You may check this by displaying an attribute from the received object, like its name or its type, in the called function.

Subject: Javascipt error

Buttons inside a form are form elements and have a .form property. Images are not form elements – they don’t have a .form property UNLESS they are created using . You need to find a way to pass the form to your function.

Subject: RE: Javascipt error

Thanks Rob and stan for your kind support.

I worked around stan suggested and it is working perfectly.

with regards,

Vikas K Sinha