Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8660933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:22:48+00:00 2026-06-12T16:22:48+00:00

How would I run a method in backend to send emails when I have

  • 0

How would I run a method in backend to send emails when I have a jquery dialogue with yes and no button as following :

<script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#dialog").dialog({
                autoOpen: false,
                modal: true
            });
        });

        $(".confirmLink").click(function (e) {
            e.preventDefault();
            var targetUrl = $(this).attr("href");

            $("#dialog").dialog({
                buttons: {
                    "Yes": function () {
                        $(this).dialog("close"),
                        SendEmail(),
                    window.location.href = targetUrl;
                    },
                    "No": function () {
                        $(this).dialog("close");
                    }
                }
            });

            $("#dialog").dialog("open");
        });
    </script>

<a class="confirmLink" href="emailsend.aspx"></a>
     <div id="dialog" title="Confirmation Required">
                    <p>
                        Do you want to send an email?</p>
                </div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:22:48+00:00Added an answer on June 12, 2026 at 4:22 pm

    You would have to communicate this with the back end via ajax, the backend would then send the email; a little like this:

    function SendEmail(email, content)
    {
        var data = "email=" + escape(email) + "&content=" + escape(content);
        $.ajax({
            url: "sendemail.asp",
            type: 'POST',
            data: data,
            success: function(data){
                alert("Hurray");
            },
            error: function() {
                alert("Oh noes! It went wrong");
            }
        }); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a action result method i would like to run. How can i
The following is a jquery code that would run when a check box is
I have a script located at /tmp/My Batch Script Files/Processing How would I run
I'm trying to have method void run( string method ) which would run method
I would like to run this script (embed drive list in a site) that
I would like to run a method in my app when the keyboard shows
Question Is there a way to have a method that will always run anytime
In a classes are some methods that are run synchronously. I would like them
I would like to know how you would run a stored procedure from a
I'm looking for a plugin that would run in a console continuously to scan

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.