If I understand what the <html:hidden property="incident.incidentId" /> tag does (and I am just guessing as it is not a standard tag), it creates a hidden input elment with a an initial value obtained from the incidentId property of the incident bean.
Is there perhaps a name attribute on the tag that you can use?
You were right. the value of incident.incidentId was null. SoI have fixed it using if condition that if this value is null dont evaluate the next line. Now I get no scripting errors in Mozilla but in IE 6 I get same error that document.getElementById (....) is null or not an object on the following line of my .js file
Yes, as I have said a few times: you cannot use getElementById to find an element that does not have an id.
You need to figure out how to get an id attribute onto the element. Stefan's post gave you one approach that may work.
In my opinion, your use of the Struts tags is obviously doing you a disservice in that they are obfuscating too much and preventing you from learning how web apps and web pages work. I would back out of the use of any such frameworks until you understand the basic concepts. [ September 14, 2005: Message edited by: Bear Bibeault ]
In that case I'd grab the documentation for the tag set that you are using to find out how to make them do what you want. Looking at the rendered HTML using the browser's View Source mechanism can go a long way to help figure what's going wrong on the client side.