RE: are you sure?

2004-03-24 Thread McCormack, Chris
If you need this to be in a confirmation box as you say, look in to using a modal 
window that has 2 javascript backed buttons on it.

hth
Chris McCormack

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: 23 March 2004 12:22
To: Struts Users Mailing List
Subject: Re: are you sure?


+1
-Martin
- Original Message - 
From: Colm Garvey [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 5:00 AM
Subject: RE: are you sure?


 Simplest thing to do here is make the method handle the submit for you.
 Replace the submit button with :
 
 html:button property=dummySubmit
 onclick=areyousure();Submit/html:button
 
 Then change the javascript to use
 
 ...if (agree){formname.submit();}
 
 Good Luck,
 
 Colm
 
 -Original Message-
 From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
 Sent: 23 March 2004 09:44
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: are you sure?
 
 
 Try with this -
 html:form action=/adddate
   name=dateForm
   type=nl.rinke.DateForm
   onsubmit=return areyousure() 
 
 Should work
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 23, 2004 3:10 PM
 To: [EMAIL PROTECTED]
 Subject: are you sure?
 
 
 Hi list,
 
 Still a struts newbie, I try to write an are you sure javascript
 confirmation box for my submit button.
 
 The question is: how can I prevent the form from being submitted
 when the user clicks no?
 
 In the Jsp, I put the following code in the head:
 
 SCRIPT LANGUAGE=javascript
function areyousure(){
   var agree = false;
   agree = confirm(are you sure?);
   if(agree){
  ... some code which is not important
   }
   return agree;
}
 /SCRIPT
 
 
 And the form tag looks like this:
 
 html:form action=/adddate
   name=dateForm
   type=nl.rinke.DateForm
   onsubmit=areyousure() 
 
 
 Whatever the user clicks, yes or no, the form
 gets submitted. I want to stop submitting the
 form when the user click no.
 
 thanks, Rinke
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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


***
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.



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



RE: are you sure?

2004-03-23 Thread Janarthan Sathiamurthy
Try with this -
html:form action=/adddate
  name=dateForm
  type=nl.rinke.DateForm 
  onsubmit=return areyousure() 

Should work

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 3:10 PM
To: [EMAIL PROTECTED]
Subject: are you sure?


Hi list, 

Still a struts newbie, I try to write an are you sure javascript
confirmation box for my submit button. 

The question is: how can I prevent the form from being submitted 
when the user clicks no? 

In the Jsp, I put the following code in the head:

SCRIPT LANGUAGE=javascript
   function areyousure(){
  var agree = false;
  agree = confirm(are you sure?);
  if(agree){
 ... some code which is not important
  }
  return agree;
   }
/SCRIPT


And the form tag looks like this:

html:form action=/adddate
  name=dateForm
  type=nl.rinke.DateForm 
  onsubmit=areyousure() 


Whatever the user clicks, yes or no, the form 
gets submitted. I want to stop submitting the 
form when the user click no.

thanks, Rinke


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


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



Re: are you sure?

2004-03-23 Thread brati . sankarghosh

Hi rinkie,

You can use a button instead. call the
_javascript_ method on the onclick event of the button. donot use submit
use a button.

Brati Sankar Ghosh
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





[EMAIL PROTECTED]
[EMAIL PROTECTED] 
03/23/2004 03:10 PM




Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
[EMAIL PROTECTED]


cc



Subject
are you sure?








Hi list, 

Still a struts newbie, I try to write an are you sure _javascript_
confirmation box for my submit button. 

The question is: how can I prevent the form from being submitted 
when the user clicks no? 

In the Jsp, I put the following code in the head:

SCRIPT LANGUAGE=_javascript_
  function areyousure(){
   var agree = false;
   agree = confirm(are you sure?);
   if(agree){
 ... some code which is not important
   }
   return agree;
  }
/SCRIPT


And the form tag looks like this:

html:form action="">
   name=dateForm
   type=nl.rinke.DateForm 



Whatever the user clicks, yes or no, the form 
gets submitted. I want to stop submitting the 
form when the user click no.

thanks, Rinke


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


ForwardSourceID:NT2C0E
 
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute 
unlawful act and can possibly attract legal action, civil and/or criminal. The 
contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk 
and neither the originator of this message nor Tata Consultancy Services takes any 
responsibility or liability towards the same. Opinions, conclusions and any other 
information contained in this message
that do not relate to the official business of Tata Consultancy Services shall be 
understood as neither given nor endorsed by Tata Consultancy Services or any affiliate 
of Tata Consultancy Services. If you have received this message in error, you should 
destroy this message and may please notify the sender by e-mail. Thank you.

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

RE: are you sure?

2004-03-23 Thread Lokanath
hi 

u can try this

html:form action=/adddate
  name=dateForm
  type=nl.rinke.DateForm 
  onsubmit=return confirm('areyousure') 

this is working 4 me

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 1:40 AM
To: [EMAIL PROTECTED]
Subject: are you sure?


Hi list, 

Still a struts newbie, I try to write an are you sure javascript
confirmation box for my submit button. 

The question is: how can I prevent the form from being submitted 
when the user clicks no? 

In the Jsp, I put the following code in the head:

SCRIPT LANGUAGE=javascript
   function areyousure(){
  var agree = false;
  agree = confirm(are you sure?);
  if(agree){
 ... some code which is not important
  }
  return agree;
   }
/SCRIPT


And the form tag looks like this:

html:form action=/adddate
  name=dateForm
  type=nl.rinke.DateForm 
  onsubmit=areyousure() 


Whatever the user clicks, yes or no, the form 
gets submitted. I want to stop submitting the 
form when the user click no.

thanks, Rinke


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



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



RE: are you sure?

2004-03-23 Thread Colm Garvey
Simplest thing to do here is make the method handle the submit for you.
Replace the submit button with :

html:button property=dummySubmit
onclick=areyousure();Submit/html:button

Then change the javascript to use

...if (agree){formname.submit();}

Good Luck,

Colm

-Original Message-
From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
Sent: 23 March 2004 09:44
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: are you sure?


Try with this -
html:form action=/adddate
  name=dateForm
  type=nl.rinke.DateForm
  onsubmit=return areyousure() 

Should work

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 3:10 PM
To: [EMAIL PROTECTED]
Subject: are you sure?


Hi list,

Still a struts newbie, I try to write an are you sure javascript
confirmation box for my submit button.

The question is: how can I prevent the form from being submitted
when the user clicks no?

In the Jsp, I put the following code in the head:

SCRIPT LANGUAGE=javascript
   function areyousure(){
  var agree = false;
  agree = confirm(are you sure?);
  if(agree){
 ... some code which is not important
  }
  return agree;
   }
/SCRIPT


And the form tag looks like this:

html:form action=/adddate
  name=dateForm
  type=nl.rinke.DateForm
  onsubmit=areyousure() 


Whatever the user clicks, yes or no, the form
gets submitted. I want to stop submitting the
form when the user click no.

thanks, Rinke


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


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


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



Re: are you sure?

2004-03-23 Thread Martin Gainty
+1
-Martin
- Original Message - 
From: Colm Garvey [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 5:00 AM
Subject: RE: are you sure?


 Simplest thing to do here is make the method handle the submit for you.
 Replace the submit button with :
 
 html:button property=dummySubmit
 onclick=areyousure();Submit/html:button
 
 Then change the javascript to use
 
 ...if (agree){formname.submit();}
 
 Good Luck,
 
 Colm
 
 -Original Message-
 From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
 Sent: 23 March 2004 09:44
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: RE: are you sure?
 
 
 Try with this -
 html:form action=/adddate
   name=dateForm
   type=nl.rinke.DateForm
   onsubmit=return areyousure() 
 
 Should work
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 23, 2004 3:10 PM
 To: [EMAIL PROTECTED]
 Subject: are you sure?
 
 
 Hi list,
 
 Still a struts newbie, I try to write an are you sure javascript
 confirmation box for my submit button.
 
 The question is: how can I prevent the form from being submitted
 when the user clicks no?
 
 In the Jsp, I put the following code in the head:
 
 SCRIPT LANGUAGE=javascript
function areyousure(){
   var agree = false;
   agree = confirm(are you sure?);
   if(agree){
  ... some code which is not important
   }
   return agree;
}
 /SCRIPT
 
 
 And the form tag looks like this:
 
 html:form action=/adddate
   name=dateForm
   type=nl.rinke.DateForm
   onsubmit=areyousure() 
 
 
 Whatever the user clicks, yes or no, the form
 gets submitted. I want to stop submitting the
 form when the user click no.
 
 thanks, Rinke
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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