Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > can i submit 2 jsp pages to the server at a single button click.

Reply
Thread Tools

can i submit 2 jsp pages to the server at a single button click.

 
 
Devendra
Guest
Posts: n/a
 
      04-24-2006
all java gurus,
I am facing trouble with this issue.
can someone please help me in this regard.

scenario is like this:

Application uses frames to load multiple JSPs.
One of the frame(say frameA) contains a form(say formA) with <select>
list and submit button.
In other frame (say frameB) i have another form(say formB).

When user clicks on 'submit' of page in frameA ; i need to check the
selection he made and load the frameB accordingly.
But before loading frame B with new content ; i want to store the
information in formB that was modified before clicking the submit of
formA.

So i will need to get both formA as well as formB to get submitted on
single submit.

1. is it possible to achieve?
2. if yes, how?

i tried by using unload event for body of page in frameB.
but the it first goes to the server -> brings new page for frame b->
calls unload for old page->
(tried to ) save the old page by call to submit()...
but now i can't see the new page in frameB.
perhaps because when server recieves the old page. it is not generating
new page after it.
server generates new page before saving old one.

please help me?
---
~Devendr@...

 
Reply With Quote
 
 
 
 
ossareh@gmail.com
Guest
Posts: n/a
 
      04-24-2006
Hi,

this sounds like more a job for javascript that for jsp. With a
javascript block you can do something like this;

onSubmit() {
form.on.page.A.submit();
form.on.page.B.submit();
}

naturally their submissions will then go to the correct jsp pages which
you can process - be warned though, if javascript is disabled on your
client's browser a click will result in no action at all.

 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      04-25-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi,
>
> this sounds like more a job for javascript that for jsp. With a
> javascript block you can do something like this;
>
> onSubmit() {
> form.on.page.A.submit();
> form.on.page.B.submit();
> }
>
> naturally their submissions will then go to the correct jsp pages which
> you can process - be warned though, if javascript is disabled on your
> client's browser a click will result in no action at all.


Assuming onSubmit() is an event in form A, won't this result in an
infinite recursion? I guess you'd need a second secret, invisible submit
button for form A to actually do the "talk to JSP backend" stuff.

- Oliver

 
Reply With Quote
 
andrewthommo@gmail.com
Guest
Posts: n/a
 
      04-25-2006

Devendra wrote:
.....
> Application uses frames to load multiple JSPs.


Frames are not recognised in HTML 4.01 (AFAIR)

They are discourage for any number of reasons, see
comp.infosystems.www.html for reasons why.

> So i will need to get both formA as well as formB to get submitted on
> single submit.


As mentioned, you might look to JS to perform this,
but check it with the experts* and they will probably
advise against it, but you might also get suggestions
that achieves it for JS enabled browsers, yet degrades
gracefully for users with browsers with no JS.

* comp.lang.javascript

Andrew T.

 
Reply With Quote
 
Oliver Wong
Guest
Posts: n/a
 
      04-26-2006
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>
> Frames are not recognised in HTML 4.01 (AFAIR)
>
> They are discourage for any number of reasons, see
> comp.infosystems.www.html for reasons why.


My USENET server carries the comp.infosystems.www hierarchy, but not
comp.infosystems.www.html, it seems. Can you tell me what those reasons may
be? I find the "navigation frame + main content frame" to be a pretty
common, and as far as I can tell, relatively problem free design. I'm aware
that some browsers (e.g. lynx) may have problem rendering frames, but they
degrade relatively elegantly.

- Oliver

 
Reply With Quote
 
Devendra
Guest
Posts: n/a
 
      04-27-2006
Thanks to all of you there ; for your valuable suggestions.
i have chosen to use javascript.

Andrew, i want to have look at those reasons for discouraing frames.
but i guess there is some typo with the link.
can you please re-send the link.

Thanks & Regards,
~Devendr@...

 
Reply With Quote
 
Owen Jacobson
Guest
Posts: n/a
 
      04-27-2006
On Wed, 26 Apr 2006 13:43:51 +0000, Oliver Wong wrote:

> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>>
>> Frames are not recognised in HTML 4.01 (AFAIR)
>>
>> They are discourage for any number of reasons, see
>> comp.infosystems.www.html for reasons why.

>
> My USENET server carries the comp.infosystems.www hierarchy, but not
> comp.infosystems.www.html, it seems.


That's because he misspelled comp.infosystems.www.authoring.html .

> Can you tell me what those reasons may be? I find the "navigation frame
> + main content frame" to be a pretty common, and as far as I can tell,
> relatively problem free design. I'm aware that some browsers (e.g. lynx)
> may have problem rendering frames, but they degrade relatively
> elegantly.


Because they're an extremely leaky abstraction of templates.

- If you arrive at the content part of a frameset without the frameset
(eg., from a search engine hit), you cannot navigate the site. Working
around this requires scripting, which is less than optimal.
- If you find a page within a frameset that you're interested in, and you
bookmark it, when you load the bookmark odds are good you'll arrive
back at the beginning of the frameset.
- They break URLs. A single URL should point to a single resource, but a
frameset's URL refers to a series of resources (one for every page you
navigate to within the frameset, not "one for every frame").
 
Reply With Quote
 
Oliver Wong
Guest
Posts: n/a
 
      04-27-2006

"Owen Jacobson" <(E-Mail Removed)> wrote in
message
news(E-Mail Removed)...
> On Wed, 26 Apr 2006 13:43:51 +0000, Oliver Wong wrote:


>> Can you tell me what those reasons

[that frames are bad]
>> may be? I find the "navigation frame
>> + main content frame" to be a pretty common, and as far as I can tell,
>> relatively problem free design. I'm aware that some browsers (e.g. lynx)
>> may have problem rendering frames, but they degrade relatively
>> elegantly.

>
> Because they're an extremely leaky abstraction of templates.
>
> - If you arrive at the content part of a frameset without the frameset
> (eg., from a search engine hit), you cannot navigate the site. Working
> around this requires scripting, which is less than optimal.


Usually what is done is that each page in the "content frame" either has
something you can click on to take you to the top level document (see the
"frames" and "no frames" link in generated JavaDocs, for example), or each
page in the content frame will contain navigational links as well (e.g. for
sequential content, the navigational frame will act as a table of contents,
with the links in the content frames will be "forward one page" or
"backwards one page").

> - If you find a page within a frameset that you're interested in, and you
> bookmark it, when you load the bookmark odds are good you'll arrive
> back at the beginning of the frameset.


Depends on the browser implementation. I believe FireFox stores the
state of each frame when bookmarked.

> - They break URLs. A single URL should point to a single resource, but a
> frameset's URL refers to a series of resources (one for every page you
> navigate to within the frameset, not "one for every frame").


This is the strongest argument against frames, in my opinion, and I
concede there isn't much you can do about this if you use frames.

- Oliver

 
Reply With Quote
 
andrewthommo@gmail.com
Guest
Posts: n/a
 
      05-02-2006

Owen Jacobson wrote:
> On Wed, 26 Apr 2006 13:43:51 +0000, Oliver Wong wrote:
>
> > <(E-Mail Removed)> wrote in message

....
> >> Frames are not recognised in HTML 4.01 (AFAIR)
> >>
> >> They are discourage for any number of reasons..

....
> > Can you tell me what those reasons may be?

....
> Because they're an extremely leaky abstraction of templates.

(trim further reasons)

Whew! Glad you provided such a good answer.
I forgot all the problems with frames as soon as I stopped
(mostly*) using them.

* I still use them for some CD based projects that are
impractical otherwise.

Andrew T.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert form to submit on load instead of clicking submit button? Network-Man HTML 5 07-07-2012 12:06 PM
Forms with multiple submit buttons vs 'form' objects with single 'submit' methods neil.fitzgerald@ic.ac.uk Python 4 04-14-2006 04:58 PM
submit the form data to the popup window without a submit button jrefactors@hotmail.com HTML 2 01-01-2005 06:07 AM
Preventing Multiple submit (Disabling Submit Button Post Click) Solution Mark ASP .Net 1 12-13-2004 08:03 PM
Disable Submit Button on Post back and On Submit in ASP.net Ghafran Abbas ASP .Net 0 10-12-2004 06:11 PM



Advertisments