Solved

classic asp:  retrieve server side content from another asp page

Posted on 2013-02-04
1
459 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
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/…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

632 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