views:

25

answers:

1

I have two pages we will call page "A" and Page "B". Page A in the root of the server which does not have any ASP access, while page B can do ASP cause it is not in the root directory. What I need to do via ajax is to send a request to Page B from Page A to get the day of the week from the server and put it in a variable for further testing on Page A.

This is what I have so far on each page. The code is obviously incomplete on both pages but I am stuck on what to do next or if I am even going in the right direction.

Page A code...

$.get("/v/vspfiles/date.asp");

Page B code...

<%@LANGUAGE="VBSCRIPT"%>
<% Option Explicit %>
<%=WeekDayName( Weekday( Date ) )%>

I see the ajax call and response in firebug so I know that part is working but do not know how to do the rest, Any help is appreciated.

+1  A: 

I hope I understood your question correctly, but if you want to get the text response of "/v/vspfiles/date.asp" then the correct way is:

$.get("/v/vspfiles/date.asp", null, function(response) {
   /* Here you can use response, which will contain the page's text */
});
Krevan
Well, yes I want to get the response but put that response in a variable so I can test for specific days of the week.
@user: well, I answered it then: `response` is a variable. =)
Krevan