Solved

classic asp:  retrieve server side content from another asp page

Posted on 2013-02-04
1
449 Views
Last Modified: 2013-02-06
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
Comment
Question by:KeithMcElroy
1 Comment
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 38854166
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question