VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 Delete Button Prompt
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

perinius
Starting Member

USA
47 Posts

Posted - June 28 2007 :  22:10:38  Show Profile  Reply with Quote
Does anyone know of a way to add a javascript prompt to the delete buttons in the admin section (an "are your sure" window)? It seems way too easy to hit the delete button by accident when marking a product processed, or updated, etc.
Thanks for any tips.

Ben

Edited by - perinius on February 29 2008 14:28:09

Mark Priest
VP-ASP Expert

United Kingdom
570 Posts

Posted - July 01 2007 :  06:17:46  Show Profile  Reply with Quote
im sure someone did this years ago in one of the older versions, what page are you trying to impliment this on?


Regards,

Mark
Retail Fireworks
Go to Top of Page

Mark Priest
VP-ASP Expert

United Kingdom
570 Posts

Posted - July 01 2007 :  06:37:33  Show Profile  Reply with Quote
OK, not tested YET, but try the following.

Search for

name="Delete"

across your entire VPASP folder and then add the following to the code that creates the delete button for the section you want to add the javascript confirmation.

It's pretty self explanitory what part you are adding it to by looking that the name of the file.

e.g. shopa_displayorders.asp Line 472 looks like <input type="submit" name="Delete" value="<%=getlang("LangOrderDeleteRecords")%>"></center>

change it to <input type="submit" name="Delete" value="<%=getlang("LangOrderDeleteRecords")%>" onclick="javascript:return confirm('Are you sure you want to delete?')"></center>

You just need to add the following javascript to each delete button.

onclick="javascript:return confirm('Are you sure you want to delete?')"

Regards,

Mark
Retail Fireworks

Edited by - Mark Priest on July 01 2007 06:50:52
Go to Top of Page

perinius
Starting Member

USA
47 Posts

Posted - July 03 2007 :  12:19:58  Show Profile  Reply with Quote
That worked great! Thanks Mark.

Ben

Edited by - perinius on February 29 2008 14:28:30
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000