Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. http GET request

http GET request

Scheduled Pinned Locked Moved Web Development
javascripthtmlsysadmintoolsquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ayala felheimer
    wrote on last edited by
    #1

    hello, i am building an http client server communication. both client and server are placed on the same ip (on an external equipment). inside the html document i wrote a script sending an http "get" request. javascript has an open function that one of its attribues it url. what do i have to fill in this field? that you,

    M A 2 Replies Last reply
    0
    • A ayala felheimer

      hello, i am building an http client server communication. both client and server are placed on the same ip (on an external equipment). inside the html document i wrote a script sending an http "get" request. javascript has an open function that one of its attribues it url. what do i have to fill in this field? that you,

      M Offline
      M Offline
      Marc Firth
      wrote on last edited by
      #2

      er.... Please can you attach your code?

      Neonlight

      1 Reply Last reply
      0
      • A ayala felheimer

        hello, i am building an http client server communication. both client and server are placed on the same ip (on an external equipment). inside the html document i wrote a script sending an http "get" request. javascript has an open function that one of its attribues it url. what do i have to fill in this field? that you,

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        Got no meaning. I think you are using some javascript code that initiates one AjaX request. Please let me know what exactly you are looking for so that we could help u. :doh: :doh:

        Abhishek Sur


        My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

        **Don't forget to click "Good Answer" if you like to.

        A 1 Reply Last reply
        0
        • A Abhishek Sur

          Got no meaning. I think you are using some javascript code that initiates one AjaX request. Please let me know what exactly you are looking for so that we could help u. :doh: :doh:

          Abhishek Sur


          My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

          **Don't forget to click "Good Answer" if you like to.

          A Offline
          A Offline
          ayala felheimer
          wrote on last edited by
          #4

          hello, thank you very much for your help. The code bellow is the js i wrote in my html doc. (It is taken from w3schools.)

          try
          {// Firefox, Opera 8.0+, Safari, IE7
          xmlHttp=new XMLHttpRequest();
          }
          catch(e)
          {// Old IE
          try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
          catch(e)
          {
          alert ("Your browser does not support XMLHTTP!");
          return;
          }
          }
          xmlHttp.open("GET",url,false);//here is my question.
          //what do i have to write as url?!?!
          xmlHttp.send(null);//thats the way of sending get messages

          What i wrote as url is: "http://"+the ip address of the equipment i am working on (http://10.0.4.150). As i have already mentioned, both client and server are placed on the same equipment. The server didn't get the request at all. I know that something does work because i got the html doc by an http request. I hope i explained myself properly. Thanks again,

          A 1 Reply Last reply
          0
          • A ayala felheimer

            hello, thank you very much for your help. The code bellow is the js i wrote in my html doc. (It is taken from w3schools.)

            try
            {// Firefox, Opera 8.0+, Safari, IE7
            xmlHttp=new XMLHttpRequest();
            }
            catch(e)
            {// Old IE
            try
            {
            xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(e)
            {
            alert ("Your browser does not support XMLHTTP!");
            return;
            }
            }
            xmlHttp.open("GET",url,false);//here is my question.
            //what do i have to write as url?!?!
            xmlHttp.send(null);//thats the way of sending get messages

            What i wrote as url is: "http://"+the ip address of the equipment i am working on (http://10.0.4.150). As i have already mentioned, both client and server are placed on the same equipment. The server didn't get the request at all. I know that something does work because i got the html doc by an http request. I hope i explained myself properly. Thanks again,

            A Offline
            A Offline
            Abhishek Sur
            wrote on last edited by
            #5

            You cant access other web site using AJAX. AJAX can only access the pages that are within the same virtual directory. Say your page which calls the AJAX is http://www.abc.com/mno.aspx And it calls xmlHttpRequest.open('http://www.abc.com/xyz.aspx') it will work fine but xmlHttpRequest.open('http://www.xyz.com/abc.aspx') will give "Access Denied" Hope you understand. :rose:

            Abhishek Sur


            My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

            **Don't forget to click "Good Answer" if you like to.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups