Solved

classic asp:  retrieve server side content from another asp page

Posted on 2013-02-04
1
438 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now