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

  • Home
  • SEARCH
  • 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 8107035
In Process

The Archive Base Latest Questions

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

My question is, how can i make an ajax request from a page in

  • 0

My question is, how can i make an ajax request from a page in sub directory and get its responce.
Here, My page index.jsp is placed inside a sub directory /vf2, inside it i have included the script file

<script src="../script/testscript.js"></script>

testscript.js

function getPlaceFromIP3(){

        var ipAdd="1";
         var params ="ipAdd="+ipAdd;     
         var resultStringX = $.ajax({
             type: "GET",
             url:"result_page.jsp",
             data: params,
             async: false
                }).responseText;
         alert(resultStringX);

        }

The page result_page.jsp is included in the public_html directory itself.
When i invoke the function from index.jsp I am getting a page not found message. How could i send request to a page in the main directory from the sub directory.

  • 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-06T00:38:41+00:00Added an answer on June 6, 2026 at 12:38 am

    And if it were a normal link how would you link to it? The same thing apply here. Use a proper relative url to the file. Start the URL from the root.

    if the file is located at http://www.example.com/result_page.jsp, it would be

    url:"/result_page.jsp",
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going to get parameter form AJAX request in Django, Here's what I'm doing:
Quick question, how can I make this valid : if($this->datos->bathrooms == 1½){$select1 = JText::_(
This is a silly question, but how can I make the stroke of some
Brief question What command can I use to make my DataSet refresh it's connection
My question is pretty simple: How can I write a function once and make
I am starting this question to try and make a central point developers can
My question can be boiled down to, where does the string returned from stringstream.str().c_str()
Short question: is there a way to make a jsonp request to a server,
Just curious if anyone can explain to me why I can request a page
How can I read the username and password from http GET in .NET MVC

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.