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 9024943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:09:02+00:00 2026-06-16T06:09:02+00:00

I am developing the web application for Mobile where I want to open SMS

  • 0

I am developing the web application for Mobile where I want to open SMS editor from javascript.
below is my aspx code

<a class="redBtn fltrt" href="#" id="lnkBuy" runat="server" onclick="return makePayment()" onserverclick="lnkBuy_Click" rev='12' rel='21'>Buy</a>

and the onClick method

function makePayment()
    {
        try
        {
            var res=confirm('Are you sure to continue?');
            if(res == true)
            {
                window.location='sms:+334343434343';
                return true;
            }
            else
            {
                return false;
            }
        }
        catch(Error)
        {

        }
    }

here is I want to open the SMS editor and call to my code behind code

protected void lnkBuy_Click(object sender, EventArgs e)
{
     //code goes here
}

By using this and I am able to open the SMS editor but not be able to redirect to my code behind code.Can any body suggest me any way to do this both action in same time or any other convenient way.

thanks in advance

  • 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-16T06:09:03+00:00Added an answer on June 16, 2026 at 6:09 am

    I use the XMLHTTPRequest to send the call to my processing page and write another function to redirect to native SMS editor call.

    Below is my code

    function makeoldPayment(courseId,basketId)
        {
            try
            {
                var res=confirm('Are you sure to continue?');
                if(res == true)
                {                   
                    var mobNo = document.getElementById('hidMNo').value;
                    var lerid = document.getElementById('hidLId').value;
                    var sendDataToServerReq = getXMLHttpRequest();
    
                    var newURL = window.location.protocol + "//" + window.location.host + "/Learners/SaveToDB.aspx?cid=1&mbid=123456&bid=43&lid=3;
                    //alert(newURL)
                    sendDataToServerReq.open("POST", newURL, false);
    
                    sendDataToServerReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8;");
                    gosms();
                    sendDataToServerReq.send("mobno="+mobNo+"&lerid="+lerid+"&basketid="+basketId+"&recordid="+courseId);
                    location.reload();
                    return false;
                }
                else
                {
                    return false;
                }
            }
            catch(Error)
            {
    
            }
        }
    
        function gosms()
        {
        try
            {
            window.location='sms:+334343434343';
            }
            catch(Error)
            {
            }
        }
    
    
    
        function getXMLHttpRequest()
        {
           var httpRequest = null;
    
            // Create the appropriate HttpRequest object for the browser.
            if (window.XMLHttpRequest != null){
                httpRequest = new window.XMLHttpRequest();
            }else if (window.ActiveXObject != null){
                // Must be IE, find the right ActiveXObject.
                var success = false;
                for (var i = 0; i < XMLHTTPREQUEST_MS_PROGIDS.length && !success; i++)
                {
                    try{
                        httpRequest = new ActiveXObject(XMLHTTPREQUEST_MS_PROGIDS[i]);
                        success = true;
                    }
                    catch (ex)
                    {}
                }
            }
    
            if (httpRequest == null){
                //alert("Error in HttpRequest():\n\nCannot create an XMLHttpRequest object.");
            }
    
            return httpRequest;
        }
    

    hop this will help some one 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a web application for sending SMS to mobile from website like 160by2
I'm developing a web application that uses PhoneGap:Build for a mobile version and want
We are developing a web application that should be accessible from a mobile phone.
I'm developing a mobile web applications using jquery mobile, HTML 5. From this application
Some background: I'm developing a web based mobile application using JavaScript. HTML rendering is
I am developing a mobile web application in asp.net. I have a button in
I am developing a mobile web application (for iPhone & Android) with a local
I'm currently developing a web application based on jQuery Mobile. I would like to
I'm developing web-application, in this I want to add all months values on the
I'm developing a web application for mobile browsers. Right now most of development is

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.