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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:57:38+00:00 2026-06-06T05:57:38+00:00

I have following code. ASPX Page <a href=AnyASPXPageOfWebsite.aspx onclick=javascript:CallJQuery(); > Set Price </a> JS

  • 0

I have following code.

ASPX Page

<a href="AnyASPXPageOfWebsite.aspx" onclick="javascript:CallJQuery();" > Set Price </a>

JS Code

function CallJQuery() {

            var prc = document.getElementById('<%= hdnPrice.ClientID %>');
            var strPrc = prc.value;

            $.ajax({
                type: "POST",
                url: "/Services/TestService.asmx/SetPrice",
                data: {Price : "'"+ strPrc + "'"},
                dataType: "json",

                error: function(xml, status) {
                    alert('Error is ' + status);
                },
                success: function(xml, status) {
                    alert('suceess' + status );
                }

            });
}

Webmethod in TestService.asmx

 [WebMethod(EnableSession = true)]
    public string SetPrice(string Price)
    {
        HttpContext.Current.Session["ProdPrice"] = Price;
        return "success";
    }

My code works in every browser except SAFARI
i set breakpoint at SetPrice() method,but its not executed in case of safari.
Also success function is executed and alert message is displayed

What is the reason for safari that method is not executed?

  • 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-06T05:57:40+00:00Added an answer on June 6, 2026 at 5:57 am

    I searched a lot for solution, applied many codes but nothing works
    I concluded that Following is not possible in safari.
    If In asp.net c# page,if you have tag with href property set to “any aspx or html page” and tag has “onclick” event which excutes some JS function which then executes “Web method” using JQuery Callback. This situation does not work and webmethod is not executed in such scenario because safari browser executes JS function and then navigate to page(set in href property),but not calling webmethod.

    that’s all as per my research.

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

Sidebar

Related Questions

I have a problem with the following code in an ASPX page: <script type=text/javascript>
Morning stackoverflow, I have a repeater, with the following code in my aspx page;
I have the following code: $(function () { $(#ARO).load('/DA.aspx?section=ARO #ARO', function() { DoSomething1(); });
In my code i have the following: optionlist.AppendFormat(<li> <a href=\setlocale.aspx?returnURL=Default.aspx&localesetting={0}\>{1}</a> </li>, DB.RSField(rs, Name), DB.RSField(rs,
I have the following code: (some.aspx.cs) if(Page.IsPostBack) { bool apple2 = false; bool pizza2
I have the following code in a c# aspx page: <ItemTemplate> <a <% if(((Dictionary<string,
I am using ASP.NET and in my .aspx page I have the following code,
i have the following code on my aspx page: jQuery(#listFondos).jqGrid({ url: '/PorMyController/LoadGridData/', datatype: 'json',
I have the following code on my Home.aspx page: <form id=frmJump method=post action=Views/ViewsHome.aspx> <input
I have the following code: $.ajax({ url: some-page.aspx, type: POST, data: {fileName: file, param02:

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.