Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 469
  • Last Modified:

classic asp: retrieve server side content from another asp page

program-directors.asp  creates html, option tags
How do I code this so that the results of program-directors.asp
are returned in the function?



if  id =  "vroutpln_progdire_1" then
      
         fld = "<select id=""" & id  &  """ name=""" &  id &  """>"
          url = "/LLIUHRFM/jx/program-directors.asp"

          set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
          xmlhttp.open "GET", url, false
          'xmlhttp.send "" 
          'fld = fld &  xmlhttp.responseText
          'set xmlhttp = nothing

         fld = fld & "</select>"

     
end if  'Select Control No 005
0
KeithMcElroy
Asked:
KeithMcElroy
1 Solution
 
Robert SchuttSoftware EngineerCommented:
If I understand it correctly, what you need to do is provide a full url, for example like this:
xmlhttp.open "GET", "http://" & Request.ServerVariables("SERVER_NAME") & url, false

Open in new window

This can be made more dynamic if you need to call a function with different url's. In some cases (but I think not in your case) you would need to check for https and include the current path if the url doesn't start with a "/".

EDIT: another option could be:
xmlhttp.open "GET", "http://localhost" & url, false

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now