Ajax URLs Regardless of the relative value

Source: Internet
Author: User
$.ajax ({
URL: "native.ajax.php?id=" + Escape (OrderID),
Type: "GET",
DataType: "JSON",
Data: "",
Success:function (data) {
if (data==1) {
Window.location.href = ". /";
}
}


http://www.a.com/user/pay/index.php
Include loads the native.php file in the WX directory, which contains the Ajax

URL If you use http://www.xx.com/user/pay/wx/native.ajax.php?id= "+ Escape (OrderID) to fetch the value

But the relative path wx/native.ajax.php,./wx/native.ajax.php, or native.ajax.php

Change to absolute path/user/pay/wx/native.ajax.php is not possible. What's going on here?


Reply to discussion (solution)

Operation must be configured with domain name

And the link under the domain name

Operation must be configured with domain name

And the link under the domain name

has been configured, my problem is to use the full URL to automatically jump, using relative address and absolute address book jump.

But it's done, because my family made a judgment. Points for you!
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.