CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Confirm Delete?

Print topic Send  topic

Author Message
Robert Rodgers
Posted: 04/08/2003, 7:30 PM

Hi All,

Using 2.0.2.6, ASP

When I try to add the Confirm message action to a button that deletes
records my confirmation message is never displayed. It looks like it is
generating the JavaScript for this but It doesn't seem to fire.

Any ideas on why?

thanks.
rob



--
"The average person thinks he isn't."
Larry Lorenzoni
++++++++++++++++++++++++++++++

PvD
Posted: 04/12/2003, 2:02 AM

Hi Rob,

I have the same problem. It creates the JavaScript, but doesn't display a
warning.
Thus the record is deleted without a chance to say "no".

I'm still working on a solution (writing my own JavaScript), but encountered
another strange thing.
If a confirmation message pops up and you say "no", it still deletes the
record. By doing it another way, it doesn't delete the record even if you
say "yes".
Perhaps a report to Yess software is comendable.

Here is a snippet of the code I use (please note that the button type has
been changed from "submit" to "button"):

In the header I put:

<script language="JavaScript">
function confirmDelete() {
var result;
result = confirm("Are you sure you want to delete this record?\nThis cannot
be undone!");
if (result = = true) {
document.Form_Name.submit();
}
else {
return false;
}
}
</script>

In the form (which is named Form_Name) I put:

<input class="AquaButton" type="button" value="Delete Record"
name="Button_Delete" onclick="confirmDelete();">

Clicking the button results in a confirmation message. If yes, the form is
sent. If no, nothing happens.
The challenge I still have is that even after denying, the record is
deleted.
If I add another piece of code that disables the button after pressing it
(preventing the user from submitting twice), the form is sent after
confirmation, but the record is not deleted.

Weird. Especially since it works fine if it is an update function instead of
delete.

Maybe someone else can help with the final details.

best regards,

Peter




"Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
news:b700kq$2mv$1@news.codecharge.com...
> Hi All,
>
> Using 2.0.2.6, ASP
>
> When I try to add the Confirm message action to a button that deletes
> records my confirmation message is never displayed. It looks like it is
> generating the JavaScript for this but It doesn't seem to fire.
>
> Any ideas on why?
>
> thanks.
> rob
>
>
>
> --
> "The average person thinks he isn't."
> Larry Lorenzoni
> ++++++++++++++++++++++++++++++
>
>

PvD
Posted: 04/12/2003, 2:02 AM

Hi Rob,

I have the same problem. It creates the JavaScript, but doesn't display a
warning.
Thus the record is deleted without a chance to say "no".

I'm still working on a solution (writing my own JavaScript), but encountered
another strange thing.
If a confirmation message pops up and you say "no", it still deletes the
record. By doing it another way, it doesn't delete the record even if you
say "yes".
Perhaps a report to Yess software is comendable.

Here is a snippet of the code I use (please note that the button type has
been changed from "submit" to "button"):

In the header I put:

<script language="JavaScript">
function confirmDelete() {
var result;
result = confirm("Are you sure you want to delete this record?\nThis cannot
be undone!");
if (result = = true) {
document.Form_Name.submit();
}
else {
return false;
}
}
</script>

In the form (which is named Form_Name) I put:

<input class="AquaButton" type="button" value="Delete Record"
name="Button_Delete" onclick="confirmDelete();">

Clicking the button results in a confirmation message. If yes, the form is
sent. If no, nothing happens.
The challenge I still have is that even after denying, the record is
deleted.
If I add another piece of code that disables the button after pressing it
(preventing the user from submitting twice), the form is sent after
confirmation, but the record is not deleted.

Weird. Especially since it works fine if it is an update function instead of
delete.

Maybe someone else can help with the final details.

best regards,

Peter




"Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
news:b700kq$2mv$1@news.codecharge.com...
> Hi All,
>
> Using 2.0.2.6, ASP
>
> When I try to add the Confirm message action to a button that deletes
> records my confirmation message is never displayed. It looks like it is
> generating the JavaScript for this but It doesn't seem to fire.
>
> Any ideas on why?
>
> thanks.
> rob
>
>
>
> --
> "The average person thinks he isn't."
> Larry Lorenzoni
> ++++++++++++++++++++++++++++++
>
>


PvD
Posted: 04/12/2003, 2:02 AM

Hi Rob,

I have the same problem. It creates the JavaScript, but doesn't display a
warning.
Thus the record is deleted without a chance to say "no".

I'm still working on a solution (writing my own JavaScript), but encountered
another strange thing.
If a confirmation message pops up and you say "no", it still deletes the
record. By doing it another way, it doesn't delete the record even if you
say "yes".
Perhaps a report to Yess software is comendable.

Here is a snippet of the code I use (please note that the button type has
been changed from "submit" to "button"):

In the header I put:

<script language="JavaScript">
function confirmDelete() {
var result;
result = confirm("Are you sure you want to delete this record?\nThis cannot
be undone!");
if (result = = true) {
document.Form_Name.submit();
}
else {
return false;
}
}
</script>

In the form (which is named Form_Name) I put:

<input class="AquaButton" type="button" value="Delete Record"
name="Button_Delete" onclick="confirmDelete();">

Clicking the button results in a confirmation message. If yes, the form is
sent. If no, nothing happens.
The challenge I still have is that even after denying, the record is
deleted.
If I add another piece of code that disables the button after pressing it
(preventing the user from submitting twice), the form is sent after
confirmation, but the record is not deleted.

Weird. Especially since it works fine if it is an update function instead of
delete.

Maybe someone else can help with the final details.

best regards,

Peter




"Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
news:b700kq$2mv$1@news.codecharge.com...
> Hi All,
>
> Using 2.0.2.6, ASP
>
> When I try to add the Confirm message action to a button that deletes
> records my confirmation message is never displayed. It looks like it is
> generating the JavaScript for this but It doesn't seem to fire.
>
> Any ideas on why?
>
> thanks.
> rob
>
>
>
> --
> "The average person thinks he isn't."
> Larry Lorenzoni
> ++++++++++++++++++++++++++++++
>
>


Robert Rodgers
Posted: 04/12/2003, 6:08 AM

Good. I thought I was going crazy<grin>

If we both report it then maybe it will move up a little bit on he priority
list.

rob

--
"The average person thinks he isn't."
Larry Lorenzoni
++++++++++++++++++++++++++++++

"PvD" <webmaster@lpp-nh.nl> wrote in message
news:b78kn9$7s2$1@news.codecharge.com...
> Hi Rob,
>
> I have the same problem. It creates the JavaScript, but doesn't display a
> warning.
> Thus the record is deleted without a chance to say "no".
>
> I'm still working on a solution (writing my own JavaScript), but
encountered
> another strange thing.
> If a confirmation message pops up and you say "no", it still deletes the
> record. By doing it another way, it doesn't delete the record even if you
> say "yes".
> Perhaps a report to Yess software is comendable.
>
> Here is a snippet of the code I use (please note that the button type has
> been changed from "submit" to "button"):
>
> In the header I put:
>
> <script language="JavaScript">
> function confirmDelete() {
> var result;
> result = confirm("Are you sure you want to delete this record?\nThis
cannot
> be undone!");
> if (result = = true) {
> document.Form_Name.submit();
> }
> else {
> return false;
> }
> }
> </script>
>
> In the form (which is named Form_Name) I put:
>
> <input class="AquaButton" type="button" value="Delete Record"
> name="Button_Delete" onclick="confirmDelete();">
>
> Clicking the button results in a confirmation message. If yes, the form is
> sent. If no, nothing happens.
> The challenge I still have is that even after denying, the record is
> deleted.
> If I add another piece of code that disables the button after pressing it
> (preventing the user from submitting twice), the form is sent after
> confirmation, but the record is not deleted.
>
> Weird. Especially since it works fine if it is an update function instead
of
> delete.
>
> Maybe someone else can help with the final details.
>
> best regards,
>
> Peter
>
>
>
>
> "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
>news:b700kq$2mv$1@news.codecharge.com...
> > Hi All,
> >
> > Using 2.0.2.6, ASP
> >
> > When I try to add the Confirm message action to a button that deletes
> > records my confirmation message is never displayed. It looks like it is
> > generating the JavaScript for this but It doesn't seem to fire.
> >
> > Any ideas on why?
> >
> > thanks.
> > rob
> >
> >
> >
> > --
> > "The average person thinks he isn't."
> > Larry Lorenzoni
> > ++++++++++++++++++++++++++++++
> >
> >
>
>

Dave Rexel
Posted: 04/12/2003, 9:27 PM

Please read this entry in the CCS KnowledgeBase
http://www.rexdesign.com/ccs/kb.php?category_id=39&lang...d=1&event_id=53
Greetings
Dave

"PvD" <webmaster@lpp-nh.nl> wrote in message
news:b78kni$7s7$2@news.codecharge.com...
> Hi Rob,
>
> I have the same problem. It creates the JavaScript, but doesn't display a
> warning.
> Thus the record is deleted without a chance to say "no".
>
> I'm still working on a solution (writing my own JavaScript), but
encountered
> another strange thing.
> If a confirmation message pops up and you say "no", it still deletes the
> record. By doing it another way, it doesn't delete the record even if you
> say "yes".
> Perhaps a report to Yess software is comendable.
>
> Here is a snippet of the code I use (please note that the button type has
> been changed from "submit" to "button"):
>
> In the header I put:
>
> <script language="JavaScript">
> function confirmDelete() {
> var result;
> result = confirm("Are you sure you want to delete this record?\nThis
cannot
> be undone!");
> if (result = = true) {
> document.Form_Name.submit();
> }
> else {
> return false;
> }
> }
> </script>
>
> In the form (which is named Form_Name) I put:
>
> <input class="AquaButton" type="button" value="Delete Record"
> name="Button_Delete" onclick="confirmDelete();">
>
> Clicking the button results in a confirmation message. If yes, the form is
> sent. If no, nothing happens.
> The challenge I still have is that even after denying, the record is
> deleted.
> If I add another piece of code that disables the button after pressing it
> (preventing the user from submitting twice), the form is sent after
> confirmation, but the record is not deleted.
>
> Weird. Especially since it works fine if it is an update function instead
of
> delete.
>
> Maybe someone else can help with the final details.
>
> best regards,
>
> Peter
>
>
>
>
> "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
>news:b700kq$2mv$1@news.codecharge.com...
> > Hi All,
> >
> > Using 2.0.2.6, ASP
> >
> > When I try to add the Confirm message action to a button that deletes
> > records my confirmation message is never displayed. It looks like it is
> > generating the JavaScript for this but It doesn't seem to fire.
> >
> > Any ideas on why?
> >
> > thanks.
> > rob
> >
> >
> >
> > --
> > "The average person thinks he isn't."
> > Larry Lorenzoni
> > ++++++++++++++++++++++++++++++
> >
> >
>
>
>

PvD
Posted: 04/13/2003, 4:51 AM

Hi Dave,

thanks for the info!
I'll get working on it at once.

Peter

"Dave Rexel" <therex_spamenot@hotmail.com> wrote in message
news:b7ap02$mm9$1@news.codecharge.com...
> Please read this entry in the CCS KnowledgeBase
>
http://www.rexdesign.com/ccs/kb.php?category_id=39&lang...d=1&event_id=53
> Greetings
> Dave
>
> "PvD" <webmaster@lpp-nh.nl> wrote in message
>news:b78kni$7s7$2@news.codecharge.com...
> > Hi Rob,
> >
> > I have the same problem. It creates the JavaScript, but doesn't display
a
> > warning.
> > Thus the record is deleted without a chance to say "no".
> >
> > I'm still working on a solution (writing my own JavaScript), but
> encountered
> > another strange thing.
> > If a confirmation message pops up and you say "no", it still deletes the
> > record. By doing it another way, it doesn't delete the record even if
you
> > say "yes".
> > Perhaps a report to Yess software is comendable.
> >
> > Here is a snippet of the code I use (please note that the button type
has
> > been changed from "submit" to "button"):
> >
> > In the header I put:
> >
> > <script language="JavaScript">
> > function confirmDelete() {
> > var result;
> > result = confirm("Are you sure you want to delete this record?\nThis
> cannot
> > be undone!");
> > if (result = = true) {
> > document.Form_Name.submit();
> > }
> > else {
> > return false;
> > }
> > }
> > </script>
> >
> > In the form (which is named Form_Name) I put:
> >
> > <input class="AquaButton" type="button" value="Delete Record"
> > name="Button_Delete" onclick="confirmDelete();">
> >
> > Clicking the button results in a confirmation message. If yes, the form
is
> > sent. If no, nothing happens.
> > The challenge I still have is that even after denying, the record is
> > deleted.
> > If I add another piece of code that disables the button after pressing
it
> > (preventing the user from submitting twice), the form is sent after
> > confirmation, but the record is not deleted.
> >
> > Weird. Especially since it works fine if it is an update function
instead
> of
> > delete.
> >
> > Maybe someone else can help with the final details.
> >
> > best regards,
> >
> > Peter
> >
> >
> >
> >
> > "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
> >news:b700kq$2mv$1@news.codecharge.com...
> > > Hi All,
> > >
> > > Using 2.0.2.6, ASP
> > >
> > > When I try to add the Confirm message action to a button that deletes
> > > records my confirmation message is never displayed. It looks like it
is
> > > generating the JavaScript for this but It doesn't seem to fire.
> > >
> > > Any ideas on why?
> > >
> > > thanks.
> > > rob
> > >
> > >
> > >
> > > --
> > > "The average person thinks he isn't."
> > > Larry Lorenzoni
> > > ++++++++++++++++++++++++++++++
> > >
> > >
> >
> >
> >
>
>

PvD
Posted: 04/13/2003, 11:21 AM

Hi Dave,

It works. I had indeed forgotten to put the "return" in...

However, the challenge with the disabled button still exists.

Also, if you change the button type from "submit" to "button" and then
submit the form with an onClick event, it doesn't work.
It does work for adding or editing the records, but somehow with delete it
won't work.

Any ideas?

Peter

"Dave Rexel" <therex_spamenot@hotmail.com> wrote in message
news:b7ap02$mm9$1@news.codecharge.com...
> Please read this entry in the CCS KnowledgeBase
>
http://www.rexdesign.com/ccs/kb.php?category_id=39&lang...d=1&event_id=53
> Greetings
> Dave
>
> "PvD" <webmaster@lpp-nh.nl> wrote in message
>news:b78kni$7s7$2@news.codecharge.com...
> > Hi Rob,
> >
> > I have the same problem. It creates the JavaScript, but doesn't display
a
> > warning.
> > Thus the record is deleted without a chance to say "no".
> >
> > I'm still working on a solution (writing my own JavaScript), but
> encountered
> > another strange thing.
> > If a confirmation message pops up and you say "no", it still deletes the
> > record. By doing it another way, it doesn't delete the record even if
you
> > say "yes".
> > Perhaps a report to Yess software is comendable.
> >
> > Here is a snippet of the code I use (please note that the button type
has
> > been changed from "submit" to "button"):
> >
> > In the header I put:
> >
> > <script language="JavaScript">
> > function confirmDelete() {
> > var result;
> > result = confirm("Are you sure you want to delete this record?\nThis
> cannot
> > be undone!");
> > if (result = = true) {
> > document.Form_Name.submit();
> > }
> > else {
> > return false;
> > }
> > }
> > </script>
> >
> > In the form (which is named Form_Name) I put:
> >
> > <input class="AquaButton" type="button" value="Delete Record"
> > name="Button_Delete" onclick="confirmDelete();">
> >
> > Clicking the button results in a confirmation message. If yes, the form
is
> > sent. If no, nothing happens.
> > The challenge I still have is that even after denying, the record is
> > deleted.
> > If I add another piece of code that disables the button after pressing
it
> > (preventing the user from submitting twice), the form is sent after
> > confirmation, but the record is not deleted.
> >
> > Weird. Especially since it works fine if it is an update function
instead
> of
> > delete.
> >
> > Maybe someone else can help with the final details.
> >
> > best regards,
> >
> > Peter
> >
> >
> >
> >
> > "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
> >news:b700kq$2mv$1@news.codecharge.com...
> > > Hi All,
> > >
> > > Using 2.0.2.6, ASP
> > >
> > > When I try to add the Confirm message action to a button that deletes
> > > records my confirmation message is never displayed. It looks like it
is
> > > generating the JavaScript for this but It doesn't seem to fire.
> > >
> > > Any ideas on why?
> > >
> > > thanks.
> > > rob
> > >
> > >
> > >
> > > --
> > > "The average person thinks he isn't."
> > > Larry Lorenzoni
> > > ++++++++++++++++++++++++++++++
> > >
> > >
> >
> >
> >
>
>

Robert Rodgers
Posted: 04/13/2003, 12:02 PM

Thanks. Also. Thanks for the KB reference. I hadn't known about it.

rob


--
"The average person thinks he isn't."
Larry Lorenzoni
++++++++++++++++++++++++++++++

"Dave Rexel" <therex_spamenot@hotmail.com> wrote in message
news:b7ap02$mm9$1@news.codecharge.com...
> Please read this entry in the CCS KnowledgeBase
>
http://www.rexdesign.com/ccs/kb.php?category_id=39&lang...d=1&event_id=53
> Greetings
> Dave
>
> "PvD" <webmaster@lpp-nh.nl> wrote in message
>news:b78kni$7s7$2@news.codecharge.com...
> > Hi Rob,
> >
> > I have the same problem. It creates the JavaScript, but doesn't display
a
> > warning.
> > Thus the record is deleted without a chance to say "no".
> >
> > I'm still working on a solution (writing my own JavaScript), but
> encountered
> > another strange thing.
> > If a confirmation message pops up and you say "no", it still deletes the
> > record. By doing it another way, it doesn't delete the record even if
you
> > say "yes".
> > Perhaps a report to Yess software is comendable.
> >
> > Here is a snippet of the code I use (please note that the button type
has
> > been changed from "submit" to "button"):
> >
> > In the header I put:
> >
> > <script language="JavaScript">
> > function confirmDelete() {
> > var result;
> > result = confirm("Are you sure you want to delete this record?\nThis
> cannot
> > be undone!");
> > if (result = = true) {
> > document.Form_Name.submit();
> > }
> > else {
> > return false;
> > }
> > }
> > </script>
> >
> > In the form (which is named Form_Name) I put:
> >
> > <input class="AquaButton" type="button" value="Delete Record"
> > name="Button_Delete" onclick="confirmDelete();">
> >
> > Clicking the button results in a confirmation message. If yes, the form
is
> > sent. If no, nothing happens.
> > The challenge I still have is that even after denying, the record is
> > deleted.
> > If I add another piece of code that disables the button after pressing
it
> > (preventing the user from submitting twice), the form is sent after
> > confirmation, but the record is not deleted.
> >
> > Weird. Especially since it works fine if it is an update function
instead
> of
> > delete.
> >
> > Maybe someone else can help with the final details.
> >
> > best regards,
> >
> > Peter
> >
> >
> >
> >
> > "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
> >news:b700kq$2mv$1@news.codecharge.com...
> > > Hi All,
> > >
> > > Using 2.0.2.6, ASP
> > >
> > > When I try to add the Confirm message action to a button that deletes
> > > records my confirmation message is never displayed. It looks like it
is
> > > generating the JavaScript for this but It doesn't seem to fire.
> > >
> > > Any ideas on why?
> > >
> > > thanks.
> > > rob
> > >
> > >
> > >
> > > --
> > > "The average person thinks he isn't."
> > > Larry Lorenzoni
> > > ++++++++++++++++++++++++++++++
> > >
> > >
> >
> >
> >
>
>

Dave Rexel
Posted: 04/13/2003, 12:19 PM

I'll do some tests...
Dave

"PvD" <webmaster@lpp-nh.nl> wrote in message
news:b7c9s6$bt$1@news.codecharge.com...
> Hi Dave,
>
> It works. I had indeed forgotten to put the "return" in...
>
> However, the challenge with the disabled button still exists.
>
> Also, if you change the button type from "submit" to "button" and then
> submit the form with an onClick event, it doesn't work.
> It does work for adding or editing the records, but somehow with delete it
> won't work.
>
> Any ideas?
>
> Peter
>
> "Dave Rexel" <therex_spamenot@hotmail.com> wrote in message
>news:b7ap02$mm9$1@news.codecharge.com...
> > Please read this entry in the CCS KnowledgeBase
> >
>
http://www.rexdesign.com/ccs/kb.php?category_id=39&lang...d=1&event_id=53
> > Greetings
> > Dave
> >
> > "PvD" <webmaster@lpp-nh.nl> wrote in message
> >news:b78kni$7s7$2@news.codecharge.com...
> > > Hi Rob,
> > >
> > > I have the same problem. It creates the JavaScript, but doesn't
display
> a
> > > warning.
> > > Thus the record is deleted without a chance to say "no".
> > >
> > > I'm still working on a solution (writing my own JavaScript), but
> > encountered
> > > another strange thing.
> > > If a confirmation message pops up and you say "no", it still deletes
the
> > > record. By doing it another way, it doesn't delete the record even if
> you
> > > say "yes".
> > > Perhaps a report to Yess software is comendable.
> > >
> > > Here is a snippet of the code I use (please note that the button type
> has
> > > been changed from "submit" to "button"):
> > >
> > > In the header I put:
> > >
> > > <script language="JavaScript">
> > > function confirmDelete() {
> > > var result;
> > > result = confirm("Are you sure you want to delete this record?\nThis
> > cannot
> > > be undone!");
> > > if (result = = true) {
> > > document.Form_Name.submit();
> > > }
> > > else {
> > > return false;
> > > }
> > > }
> > > </script>
> > >
> > > In the form (which is named Form_Name) I put:
> > >
> > > <input class="AquaButton" type="button" value="Delete Record"
> > > name="Button_Delete" onclick="confirmDelete();">
> > >
> > > Clicking the button results in a confirmation message. If yes, the
form
> is
> > > sent. If no, nothing happens.
> > > The challenge I still have is that even after denying, the record is
> > > deleted.
> > > If I add another piece of code that disables the button after pressing
> it
> > > (preventing the user from submitting twice), the form is sent after
> > > confirmation, but the record is not deleted.
> > >
> > > Weird. Especially since it works fine if it is an update function
> instead
> > of
> > > delete.
> > >
> > > Maybe someone else can help with the final details.
> > >
> > > best regards,
> > >
> > > Peter
> > >
> > >
> > >
> > >
> > > "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
> > >news:b700kq$2mv$1@news.codecharge.com...
> > > > Hi All,
> > > >
> > > > Using 2.0.2.6, ASP
> > > >
> > > > When I try to add the Confirm message action to a button that
deletes
> > > > records my confirmation message is never displayed. It looks like
it
> is
> > > > generating the JavaScript for this but It doesn't seem to fire.
> > > >
> > > > Any ideas on why?
> > > >
> > > > thanks.
> > > > rob
> > > >
> > > >
> > > >
> > > > --
> > > > "The average person thinks he isn't."
> > > > Larry Lorenzoni
> > > > ++++++++++++++++++++++++++++++
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.