integrating Javascript

Results 1 to 2 of 2

Thread: integrating Javascript

  1. #1
    Join Date
    Dec 1969

    Default integrating Javascript

    Is it possible (and how) to use a Javascript function to execute an asp routine?<BR><BR>I want to have a page where someone can click a button next to a list item to delete it from a database, but after clicking delete will have to click OK (or Cancel) in a Javascript confirmation box, which will then run the string: Sql = "DELETE FROM....WHERE...." to delete the record if the user confirms.<BR><BR>(I&#039;m really just thinking of doing this as a possible alternative to redirecting to another asp page with a confirm button and the deletion string, in doing so reducing number of site pages).<BR><BR>The Javascript function I want to use is along the following lines:<BR><BR>&#060;script language="Javascript"&#062;<BR>&#060;!--<BR>function delete(){<BR>if(confirm("permanently delete, are you sure?"))<BR>{<BR>alert("deleted!")<BR>}<BR>}<BR>//-&#062;<BR>&#060;/script&#062;

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category The Nature of Things

    The link to the ASPFAQs is at the top right corner of this very page, just to make it easy for you to look up things like this.<BR><BR>Go there, and check out the category noted above.<BR><BR>Since you seem to be a newbie, here are a couple of direct links:<BR><BR><BR><BR>But, really, learn to use the ASPFAQs. They are your friends.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts