Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - confirming delete
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

confirming delete

 Post Reply Post Reply
Author
mkbutler View Drop Down
Newbie
Newbie


Joined: 13 April 2007
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mkbutler Quote  Post ReplyReply Direct Link To This Post Topic: confirming delete
    Posted: 13 April 2007 at 6:34pm
First of all may I congratulate whoever wrote the tutorials. I have the database created and almost ready to put "live". But I can't get 1 little things to work:

Response.Write ("<a href=""deleteStudent.asp?ID_No=" & rsStudents("uniqueRecordID")& """>")

I want to add to this a confirm delete, but everytime I do, it says that a paren is expected. I can get the confirm to work as just a "Click Here" without asp, but when I add it to the Response.Write - paren expected.

Any gurus that can help me?
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2007 at 7:10pm
you can do it with Javascripts (which am guessing your trying to use) by doing the following:

Response.Write ("<a href=""deleteStudent.asp?ID_No=" & rsStudents("uniqueRecordID")& """ onClick=""return confrim('Are you sure you want to delete this?';)"">")


when using Response.Write, you use the quotes to encase your 'string'. but if you want to acctually write a quotation mark in html, you need to put double quotes (as you can see in this example), as ASP will cancel it out, rather than ending the string when it gets to the first quote.

so just remember to always use double quotes when putting HTML in Reponse.Write.
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
mkbutler View Drop Down
Newbie
Newbie


Joined: 13 April 2007
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote mkbutler Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2007 at 7:17pm
I don't see any example? Can you try to show me an example of what you are talking about or what I am doing wrong.
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2007 at 7:46pm
well the code you posted, and i posted.

you will notice it has href=""delete, two quotation marks, this is to cancel it out, so the ASP wont process it as the end of the string.

and in my earlier post, i added, in read, the javascript for "confirming delete".


Edited by Scotty32 - 13 April 2007 at 7:47pm
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.