You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brad Balmer <bb...@peapod.com> on 2004/05/12 14:45:52 UTC

Design Issue/Question

I have an application where a user is adding items for a customer.  The 
form where the user will be on will have a list of products to choose 
from, and can add a product for the customer by clicking on the checkbox.

The issue I am having is that I need to have the application do an 
insert into the database when the user clicks on a checkbox.  What I 
can't have is for the form to do a submit for each check (because of the 
time it would take to re-display the page) and I can't have the user 
click on all of their items and do one big submit at the end (requirements).

Is this even possible within the web and struts framework?  (To have 
some sort of javascript kick off to tell something to do a database 
insert without submitting the form and without the user being redirected 
to another page).

Thanks to anybody who may have any insight into if there is anything I 
can do.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Design Issue/Question

Posted by Brad Balmer <bb...@peapod.com>.
So I would create a frame on my page that has a form with the action 
that I need to call?  Then my javascript (onclick) would just reference 
the new frame and call the submit on the frame?

Is this correct?  If so, by submitting the frame there would be no 
perceived effect on the page that the customer is currently looking at?

Thanks.

Daniel Perry wrote:

>I've done similar things before.
>Use javascript to open an action to add it to the database.  This can be in
>a new window, in another frame, or in a hidden iframe!
>
>
>Daniel.
>
>-----Original Message-----
>From: Brad Balmer [mailto:bbalmer@peapod.com]
>Sent: 12 May 2004 13:46
>To: Struts Users Mailing List
>Subject: Design Issue/Question
>
>
>I have an application where a user is adding items for a customer.  The
>form where the user will be on will have a list of products to choose
>from, and can add a product for the customer by clicking on the checkbox.
>
>The issue I am having is that I need to have the application do an
>insert into the database when the user clicks on a checkbox.  What I
>can't have is for the form to do a submit for each check (because of the
>time it would take to re-display the page) and I can't have the user
>click on all of their items and do one big submit at the end (requirements).
>
>Is this even possible within the web and struts framework?  (To have
>some sort of javascript kick off to tell something to do a database
>insert without submitting the form and without the user being redirected
>to another page).
>
>Thanks to anybody who may have any insight into if there is anything I
>can do.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Design Issue/Question

Posted by wojingo <wo...@fastmail.com.au>.
Hi,

On Wed, 2004-05-12 at 22:37, Daniel Perry wrote:
> I've done similar things before.
> Use javascript to open an action to add it to the database.  This can be in
> a new window, in another frame, or in a hidden iframe!

I'm pretty sure you could do it using divs aswell, the dynapi(a cross
platform dhtml library) is good for this type of thing.

http://dynapi.sourceforge.net/dynapi/

cheers,
-
shaun

> 
> 
> Daniel.
> 
> -----Original Message-----
> From: Brad Balmer [mailto:bbalmer@peapod.com]
> Sent: 12 May 2004 13:46
> To: Struts Users Mailing List
> Subject: Design Issue/Question
> 
> 
> I have an application where a user is adding items for a customer.  The
> form where the user will be on will have a list of products to choose
> from, and can add a product for the customer by clicking on the checkbox.
> 
> The issue I am having is that I need to have the application do an
> insert into the database when the user clicks on a checkbox.  What I
> can't have is for the form to do a submit for each check (because of the
> time it would take to re-display the page) and I can't have the user
> click on all of their items and do one big submit at the end (requirements).
> 
> Is this even possible within the web and struts framework?  (To have
> some sort of javascript kick off to tell something to do a database
> insert without submitting the form and without the user being redirected
> to another page).
> 
> Thanks to anybody who may have any insight into if there is anything I
> can do.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Design Issue/Question

Posted by Daniel Perry <d....@netcase.co.uk>.
I've done similar things before.
Use javascript to open an action to add it to the database.  This can be in
a new window, in another frame, or in a hidden iframe!


Daniel.

-----Original Message-----
From: Brad Balmer [mailto:bbalmer@peapod.com]
Sent: 12 May 2004 13:46
To: Struts Users Mailing List
Subject: Design Issue/Question


I have an application where a user is adding items for a customer.  The
form where the user will be on will have a list of products to choose
from, and can add a product for the customer by clicking on the checkbox.

The issue I am having is that I need to have the application do an
insert into the database when the user clicks on a checkbox.  What I
can't have is for the form to do a submit for each check (because of the
time it would take to re-display the page) and I can't have the user
click on all of their items and do one big submit at the end (requirements).

Is this even possible within the web and struts framework?  (To have
some sort of javascript kick off to tell something to do a database
insert without submitting the form and without the user being redirected
to another page).

Thanks to anybody who may have any insight into if there is anything I
can do.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org