Hi Ranchers,
Can any one explain why nested form tag (Form within a form) in html will not work. some says that the browser will see it as an single form. I don't get the idea behind these.
please throw some light on it.. thanks
If you were to send someone a letter by post, what is the sense of tearing the letter into two pieces, putting one piece in an envelope, then putting that envelope and the other piece of the letter into another envelope? That's basically what you'd be doing with a form within a form. In either case, somebody is going to wonder what the heck you've been smoking...
If you look at the HTMl specification, you'll see that there's nothing in it about nested forms. In other words, nested form tags not working is an indicator of nested forms not working. That's by design.
Well, jQuery questions should be asked in this forum, not in the Struts forum. You may want to start a new topic here with all the relevant details (and just those) about how you're trying to submit a form via jQuery and how it's not working.
The relevant part here is that nested forms do not exist, whatever the requirements may be.
Ulf Dittmer wrote:The relevant part here is that nested forms do not exist, whatever the requirements may be.
Thanks i got it. but, is there any way i can submit the jquery dialog box values (i have number of text and other fields) to the controller via ajax, i am struggling here , any idea
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
Ulf Dittmer wrote:You may want to start a new topic here with all the relevant details (and just those) about how you're trying to submit a form via jQuery and how it's not working.
When you find yourself struggling to make a technology do something, it sometimes helps to step back and rethink your strategy. Rather than trying to force the technology to do something it wasn't designed to do, try to work with the things that it can do. It seems to me that you are fixated on a solution that just isn't possible; try to find some other approach and rework your design.
K.how about this ?? can i transfer my Jquery dialog Box values back to the form itself. might be storing in a List or something??? without submitting (post / get)..
The code can be as easy as: $('#theForm').ajaxSubmit();
I need to submit PageB which is inside PageA . below is my code
Script
form inside form will not work here (as per my understanding). Can i save the dialog values in a list or something without doing POST or GET so that i can submit it when my form1 is posted
No i dont want to use JSF here.. and i am unaware of it too. My requirement is below,
user enters values in a form , hits a button open dialog form which has again a list of values saves it. edit and delete it. finally submit the form.
Is there a way to implement this. i am completely bewildered .
Abdul Wahab wrote:No i dont want to use JSF here.. and i am unaware of it too.
OK, so now I'm confused. Your markup has JSF tags -- if you don't want to use JSF, why are you?
My requirement is below,
user enters values in a form , hits a button open dialog form which has again a list of values saves it. edit and delete it. finally submit the form.
Is there a way to implement this. i am completely bewildered .
If you are using jQuery UI dialogs, the dialog content can go anywhere. It does not need to go inside the other form. Put it near the end of the body.
Hmm, the h prefix is usually used for JSF, but I haven't used Struts in over 10 years so I may just be out of the loop. In any case, put the dialog content somewhere other than in the main form.