Re: Submit, ajax, targets and action

2008-03-01 Thread Martin Gainty
Matt-

//treeNodeSelected is a good example of divTag.innerHtml = data;
//in tags/ui/treeExampleDynamic.jsp
dojo.event.topic.subscribe("treeSelected", this, "treeNodeSelected");

RE: Submit, ajax, targets and action

2008-03-01 Thread Matthew Seaborn
Okay, got all this work; works fine. Cheers, Richard.

In the end it looked like

function submitFunctionA() {
preventCache: true,
load:function(type, data, evt) {
$("#formId").html(data) ;
  },
method: "POST",
formNode: dojo.byId("formId")
}

Note the use of jQuery in the load function; IE was being reluctant to
populate the innerHTML (apparently it does this with some HTML), jQuery
seemed to get round this.

Damned annoying the Struts 2 submit tag doesn't do it for us!   
  
-Original Message-
From: Matthew Seaborn 
Sent: 01 March 2008 15:31
To: 'Struts Users Mailing List'
Subject: RE: Submit, ajax, targets and action

Thanks for the advice.

How is this function supposed  to be used, is it called from onclick in
the s:submit tag?  


-Original Message-
From: Richard Sayre [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2008 18:42
To: Struts Users Mailing List
Subject: Re: Submit, ajax, targets and action

Sorry this posted too early... I updated the code so it submits the
form fields with the ajax request:

let me know if it helps.

Rich


>  function submitFunctionA() {
>
>   var kw = {
> url:'',
> load:function(type, data, evt) {
> //up to you what happens here
> },
> method: "POST",
> formNode: dojo.byId("myForm"),
> error: function(type, data, evt){
> //error
> }
> };
>
> dojo.io.bind(kw);
> }
>
>  }
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Submit, ajax, targets and action

2008-03-01 Thread Matthew Seaborn
Thanks for the advice.

How is this function supposed  to be used, is it called from onclick in
the s:submit tag?  


-Original Message-
From: Richard Sayre [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2008 18:42
To: Struts Users Mailing List
Subject: Re: Submit, ajax, targets and action

Sorry this posted too early... I updated the code so it submits the
form fields with the ajax request:

let me know if it helps.

Rich


>  function submitFunctionA() {
>
>   var kw = {
> url:'',
> load:function(type, data, evt) {
> //up to you what happens here
> },
> method: "POST",
> formNode: dojo.byId("myForm"),
> error: function(type, data, evt){
> //error
> }
> };
>
> dojo.io.bind(kw);
> }
>
>  }
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Submit, ajax, targets and action

2008-02-27 Thread Matthew Seaborn
This simply appears to make the click on the submit button perform an
unparameterised GET on the defined URL.

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2008 18:42
To: Struts Users Mailing List
Subject: Re: Submit, ajax, targets and action

Just set the "href" on each submit to the url that it needs to submit
to, and it should work.

regards
musachy

On Tue, Feb 26, 2008 at 1:39 PM, Richard Sayre <[EMAIL PROTECTED]>
wrote:
> If I understand you correctly, You could write you own submit
>  function(s) that does its own ajax with dojo
>
>  function submitFunctionA() {
>
>   var kw = {
> url:'',
> load:function(type, data, evt) {
> //up to you what happens here
> },
> method: "POST",
>
> error: function(type, data, evt){
> //error
> }
> };
>
> dojo.io.bind(kw);
> }
>
>  }
>
>  So you could have each of your submit buttons call their own function
>  and forget about the form
>
>
>
>  On Tue, Feb 26, 2008 at 2:59 PM, Matthew Seaborn
>  <[EMAIL PROTECTED]> wrote:
>  >
>  >
>  >
>  >
>  > I have a form which contains a number of different submit buttons,
each
>  > using the action attribute on the submit tag to control which
action this
>  > called, this work fine.
>  >
>  >
>  >
>  > I want this form to load dynamically into a DIV on another page and
then
>  > using the AJAX theme and targets attributes on the submit tag such
that the
>  > form updates and remains in the DIV, this also works.
>  >
>  >
>  >
>  > However, the action attribute does not appear to work with the AJAX
theme;
>  > the called action is the form defined one.  Is this deliberate or a
bug?
>  > Does anyone know a good workaround?
>  >
>  >
>  >
>  > Many thanks.
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >  Matthew Seaborn
>  >
>  > Software Architect
>  >  t+44(0) 208 484 0729
>  >  m  +44(0) 7949 465 142
>  >
>  > e   [EMAIL PROTECTED]
>  >
>  >
>  >  Sussex House
>  >  Plane Tree Crescent
>  >  Feltham, Middlesex, TW13 7HE
>  >  United Kingdom
>  >  http://www.performgroup.com/
>  >
>  >
>  >
>  >
>  >

>  >
>  >  CONFIDENTIALITY - This email and any files transmitted with it,
are
>  > confidential, may be legally privileged and are intended solely for
the use
>  > of the individual or entity to whom they are addressed. If this has
come to
>  > you in error, you must not copy, distribute, disclose or use any of
the
>  > information it contains. Please notify the sender immediately and
delete
>  > them from your system.
>  >
>  >  SECURITY - Please be aware that communication by email, by its
very nature,
>  > is not 100% secure and by communicating with Perform Group by email
you
>  > consent to us monitoring and reading any such correspondence.
>  >
>  >  VIRUSES - Although this email message has been scanned for the
presence of
>  > computer viruses, the sender accepts no liability for any damage
sustained
>  > as a result of a computer virus and it is the recipient's
responsibility to
>  > ensure that email is virus free.
>  >
>  >  AUTHORITY - Any views or opinions expressed in this email are
solely those
>  > of the sender and do not necessarily represent those of Perform
Group.
>  >
>  >  COPYRIGHT - Copyright of this email and any attachments belongs to
Perform
>  > Group, Companies House Registration number 6324278.
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the informa

Re: Submit, ajax, targets and action

2008-02-26 Thread Musachy Barroso
Just set the "href" on each submit to the url that it needs to submit
to, and it should work.

regards
musachy

On Tue, Feb 26, 2008 at 1:39 PM, Richard Sayre <[EMAIL PROTECTED]> wrote:
> If I understand you correctly, You could write you own submit
>  function(s) that does its own ajax with dojo
>
>  function submitFunctionA() {
>
>   var kw = {
> url:'',
> load:function(type, data, evt) {
> //up to you what happens here
> },
> method: "POST",
>
> error: function(type, data, evt){
> //error
> }
> };
>
> dojo.io.bind(kw);
> }
>
>  }
>
>  So you could have each of your submit buttons call their own function
>  and forget about the form
>
>
>
>  On Tue, Feb 26, 2008 at 2:59 PM, Matthew Seaborn
>  <[EMAIL PROTECTED]> wrote:
>  >
>  >
>  >
>  >
>  > I have a form which contains a number of different submit buttons, each
>  > using the action attribute on the submit tag to control which action this
>  > called, this work fine.
>  >
>  >
>  >
>  > I want this form to load dynamically into a DIV on another page and then
>  > using the AJAX theme and targets attributes on the submit tag such that the
>  > form updates and remains in the DIV, this also works.
>  >
>  >
>  >
>  > However, the action attribute does not appear to work with the AJAX theme;
>  > the called action is the form defined one.  Is this deliberate or a bug?
>  > Does anyone know a good workaround?
>  >
>  >
>  >
>  > Many thanks.
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  >  Matthew Seaborn
>  >
>  > Software Architect
>  >  t+44(0) 208 484 0729
>  >  m  +44(0) 7949 465 142
>  >
>  > e   [EMAIL PROTECTED]
>  >
>  >
>  >  Sussex House
>  >  Plane Tree Crescent
>  >  Feltham, Middlesex, TW13 7HE
>  >  United Kingdom
>  >  http://www.performgroup.com/
>  >
>  >
>  >
>  >
>  >  
>  >
>  >  CONFIDENTIALITY - This email and any files transmitted with it, are
>  > confidential, may be legally privileged and are intended solely for the use
>  > of the individual or entity to whom they are addressed. If this has come to
>  > you in error, you must not copy, distribute, disclose or use any of the
>  > information it contains. Please notify the sender immediately and delete
>  > them from your system.
>  >
>  >  SECURITY - Please be aware that communication by email, by its very 
> nature,
>  > is not 100% secure and by communicating with Perform Group by email you
>  > consent to us monitoring and reading any such correspondence.
>  >
>  >  VIRUSES - Although this email message has been scanned for the presence of
>  > computer viruses, the sender accepts no liability for any damage sustained
>  > as a result of a computer virus and it is the recipient's responsibility to
>  > ensure that email is virus free.
>  >
>  >  AUTHORITY - Any views or opinions expressed in this email are solely those
>  > of the sender and do not necessarily represent those of Perform Group.
>  >
>  >  COPYRIGHT - Copyright of this email and any attachments belongs to Perform
>  > Group, Companies House Registration number 6324278.
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Submit, ajax, targets and action

2008-02-26 Thread Richard Sayre
Sorry this posted too early... I updated the code so it submits the
form fields with the ajax request:

let me know if it helps.

Rich


>  function submitFunctionA() {
>
>   var kw = {
> url:'',
> load:function(type, data, evt) {
> //up to you what happens here
> },
> method: "POST",
> formNode: dojo.byId("myForm"),
> error: function(type, data, evt){
> //error
> }
> };
>
> dojo.io.bind(kw);
> }
>
>  }
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Submit, ajax, targets and action

2008-02-26 Thread Richard Sayre
If I understand you correctly, You could write you own submit
function(s) that does its own ajax with dojo

function submitFunctionA() {

  var kw = {
url:'',
load:function(type, data, evt) {
//up to you what happens here
},
method: "POST",

error: function(type, data, evt){
//error
}
};

dojo.io.bind(kw);
}

}

So you could have each of your submit buttons call their own function
and forget about the form

On Tue, Feb 26, 2008 at 2:59 PM, Matthew Seaborn
<[EMAIL PROTECTED]> wrote:
>
>
>
>
> I have a form which contains a number of different submit buttons, each
> using the action attribute on the submit tag to control which action this
> called, this work fine.
>
>
>
> I want this form to load dynamically into a DIV on another page and then
> using the AJAX theme and targets attributes on the submit tag such that the
> form updates and remains in the DIV, this also works.
>
>
>
> However, the action attribute does not appear to work with the AJAX theme;
> the called action is the form defined one.  Is this deliberate or a bug?
> Does anyone know a good workaround?
>
>
>
> Many thanks.
>
>
>
>
>
>
>
>
>
>
>
>  Matthew Seaborn
>
> Software Architect
>  t+44(0) 208 484 0729
>  m  +44(0) 7949 465 142
>
> e   [EMAIL PROTECTED]
>
>
>  Sussex House
>  Plane Tree Crescent
>  Feltham, Middlesex, TW13 7HE
>  United Kingdom
>  http://www.performgroup.com/
>
>
>
>
>  
>
>  CONFIDENTIALITY - This email and any files transmitted with it, are
> confidential, may be legally privileged and are intended solely for the use
> of the individual or entity to whom they are addressed. If this has come to
> you in error, you must not copy, distribute, disclose or use any of the
> information it contains. Please notify the sender immediately and delete
> them from your system.
>
>  SECURITY - Please be aware that communication by email, by its very nature,
> is not 100% secure and by communicating with Perform Group by email you
> consent to us monitoring and reading any such correspondence.
>
>  VIRUSES - Although this email message has been scanned for the presence of
> computer viruses, the sender accepts no liability for any damage sustained
> as a result of a computer virus and it is the recipient's responsibility to
> ensure that email is virus free.
>
>  AUTHORITY - Any views or opinions expressed in this email are solely those
> of the sender and do not necessarily represent those of Perform Group.
>
>  COPYRIGHT - Copyright of this email and any attachments belongs to Perform
> Group, Companies House Registration number 6324278.
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Submit, ajax, targets and action

2008-02-26 Thread Matthew Seaborn
I have a form which contains a number of different submit buttons, each
using the action attribute on the submit tag to control which action
this called, this work fine.

 

I want this form to load dynamically into a DIV on another page and then
using the AJAX theme and targets attributes on the submit tag such that
the form updates and remains in the DIV, this also works.

 

However, the action attribute does not appear to work with the AJAX
theme; the called action is the form defined one.  Is this deliberate or
a bug?  Does anyone know a good workaround?

 

Many thanks.

 





 


Matthew Seaborn

Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142

e   [EMAIL PROTECTED]
 

 
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/   

 

 




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.