aspose file tools*
The moose likes Struts and the fly likes Nested Form problem with IE. How to avoid using struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Nested Form problem with IE. How to avoid using struts?" Watch "Nested Form problem with IE. How to avoid using struts?" New topic
Author

Nested Form problem with IE. How to avoid using struts?

DimuthuDeeJay Jayamanna
Greenhorn

Joined: Nov 17, 2004
Posts: 5
Hi all java gurus,

My JSP:




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!!!

satya nara
Greenhorn

Joined: Aug 29, 2007
Posts: 2
Hi use form outside inner form

like

use this way



http://javaworkbook.blogspot.com
DimuthuDeeJay Jayamanna
Greenhorn

Joined: Nov 17, 2004
Posts: 5
Thanks for the reply.

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: 39549
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
DimuthuDeeJay Jayamanna
Greenhorn

Joined: Nov 17, 2004
Posts: 5
Hi Ulf Dittmer,

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: 39549
    
  27
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
solved it like this. I wonder why struts submit buttons passes parameters incorrectly.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested Form problem with IE. How to avoid using struts?
 
Similar Threads
how to print multiple file uploads in console
How to retain the latest selected value of drop down box.
Null value is coming
When Validation Error I Lose My Bean Value-Struts 2
Jsp file not compling