Here I have a collection of keywords, and printing them in a loop with submit buttons and the user can delete whatever the keyword they like. (action will remove the corresponding entry from the ArrayList). Also the user can add a keyword to the collection using another submit button. (adding a new entry to arraylist)
The problem is this code segment don't work in IE, and later I found out that the sitemesh in my program is adding another fom element to the JSP. I googled and found out that the nested forms are not working in IE. (and it is not recommended?)
I tried to fix this by removing my form tag, but my keyword removal function failed (the action can't distinguish which keyword is to be removed). only the adding keyword was working.
I tried it using javascript but I couldn't find a way to get the remove-button index the user presses. (because keywords are rendered dynamically)
Am I doing something wrong? I'm not much familiar with using JSPs. Please help me!!!
But my sitemesh configuration added a <form> tag to the upper section and closes it at the lower. (its a header and footer)
So I dont have a control over it
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35222
7
posted
0
Then you had better change the SiteMesh configuration, hadn't you? It's a weird design to use a library like SiteMesh for opening/closing form tags anyway, and even more so to do it in the page header/footer.
I agree with you.
However I looked through the sitemesh configurations and the include pages and couldnt find any form tags inside the header and footer. But after I render the page, it appears in the JSP (page->view source)
Apart from that, I'm not sure about the consequences of changing since so many share the same config.
Thats why I tried to change my JSP.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35222
7
posted
0
I'd advise not to change anything until (and unless) you fully understand which parts of the final HTML originate from which JSP pages or page fragments, in whichever way they may be included.
DimuthuDeeJay Jayamanna
Greenhorn
Joined: Nov 17, 2004
Posts: 5
posted
0
solved it like this. I wonder why struts submit buttons passes parameters incorrectly.