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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:13:46+00:00 2026-05-31T19:13:46+00:00

I am trying to send a json RPC ajax request when the page is

  • 0

I am trying to send a json RPC ajax request when the page is loaded. Here is my javascript code:

$(document).ready(function() {
        var data="orderID=<?=$_POST['orderID'];?>&&lang=eng";
        $.ajax({
            url: "ajax/get_json_variables.php", 
            type: "POST",       
            data: data,     
            cache: false,
            success: function (html) {
                var splited=html.split("|");
                if(splited[0]=="0")
                {
                    alert(splited[1]);
                }
                else
                {
                    $.ajax({
                        url: "https://91.199.226.106/ssljson.php",  
                        type: "POST",       
                        data: splited[1],       
                        cache: false,
                        dataType:"json",
                        success: function (html) {
                            alert(html);
                        }
                    });
                }
            }   
        });
    });

With the first ajax request I get json string for the second request. Google chrome gives me this error:

XMLHttpRequest cannot load https://91.199.226.106/ssljson.php. Origin http://www.nver.am is not allowed by Access-Control-Allow-Origin.

I don`t get what is the problem? Thanks for help.

  • 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-05-31T19:13:48+00:00Added an answer on May 31, 2026 at 7:13 pm

    The issue is due to the Same Domain Policy, and it can be tricky to work around. If you were not using jQuery, a couple of ways you can get around this and still achieve the desired functionality would be to use iframes and a cross-domain messaging helper such as EasyXDM, or dynamically injected tags to fetch your JSON in a special format known as JSONP.

    Thankfully you are using jQuery, so you can use http://api.jquery.com/jQuery.getJSON/ and JSONP to work around the Same Origin Policy.

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

Sidebar

Related Questions

I'm trying to send json string in the get request to the server, here
I'm trying to send the node instance JSON data using an ajax get request
I'm trying to send an ajax request using jquery. From the tutorial, I try
I have this code to send data: function insert_new_image() { var ids = [];
I am trying to send a serialized object using JSON. Here is my view
I'm trying to send a Json array over using an AJAX call to a
I am trying to use jQuery ajax to send a json object to a
i'm trying to send an js object to a php function using jquery.ajax .
I'm trying to send a JSON request to a remote device that then returns
I've been trying to send a JSON string to PHP server like this: $.ajax({

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.