1
$.ajax({
    type: "GET",
    url : "https://ap1.salesforce.com/apex/ABCgraph",
    dataType:"html",

In the above sample ,How to call the VF page in "url".

1

If you use the "Network" tab of your browser's "Developer Tools" (see e.g. How do I start to debug my own Visualforce/JavaScript? you will see that a valid "GET" request to Salesforce needs a lot more than just the URL (assuming you are using authentication). Salesforce do not document these details and may at any time choose to change them. So while you might be able to reverse engineer out the key items, your code might stop working at any time.

Salesforce have built a variety of platform features that encapsulate all of this internal detail and adapting your design to fit with one of those will be a lot less work and way less fragile than trying to impose a design that does not fit the platform.

Here is an example of a full "GET" request for one of my Visualforce pages - the Cookie header contains many magic names and values:

GET /apex/Settings HTTP/1.1
Host: cveep.na15.visual.force.com
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cookie: s_fid=670D19BCD92F775C-1C20C1369AAC06FE; webact=%7B%22l_vdays%22%3A67%2C%22l_visit%22%3A1385068874683%2C%22session%22%3A1390830632887%2C%22l_search%22%3A%22%22%2C%22l_dtype%22%3A%22%22%2C%22l_page%22%3A%22SFDC%3Aus%3Aapp%3Aapex%3Aclaimintakeview%22%2C%22counter%22%3A1773%2C%22pv%22%3A2%2C%22f_visit%22%3A1313052950330%2C%22version%22%3A%22w172.1%22%2C%22l_cloud%22%3A%22No%20Cloud%22%2C%22seg%22%3A%22customer%3Aus%22%2C%22d%22%3A%2270130000000sUVv%22%2C%22customer%22%3A1373636914921%2C%22developer%22%3A1381735799809%7D; oinfo="c3RhdHVzPUZSSUUmdHlwZT0zJm9pZD0wMERpMDAwMDAwMGk1SUU="; autocomplete=1; _ga=GA1.2.1509011341.1390664259; umps_clientId=1c049369b524edafee6ca32667e9b52cba14a0bb; sid=00Di0000000i4FE!BGQAQHKci65xMw7P4eDK1VqnrpC_Nj3MnxchA9d4nk8MSE_3NWfNxuQ5PJSWtqtKEkE9uupUiqxposk2sUTmoROhHqGaE8TX; sid_Client=00000026TUa0000000i3IE; clientSrc=68.18.105.34; inst=APPi
0

Can you try using below code :

$.ajax({
    type: "GET",
    url : "/apex/ABCgraph",
    dataType:"html",

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.