View Full Version : hit a page without a redirect
esthera
09-12-2005, 09:51 AM
I want to hit a page without a redirect....
basically calling the page with my query values as if it was redirected but the user should not see the redirect or actually be redirected.
Any ideas?
Spudhead
09-12-2005, 12:05 PM
It sounds like you want to look up the Server.Execute command, but it depends on what you're actually trying to do with it.
Roelf
09-12-2005, 12:18 PM
Or use xmlhttp to send your values to your asp-page
esthera
09-12-2005, 06:18 PM
i don't think xmlhttp will work
I actually want to hit a php page without user seeing and with continuing my asp script.
with teh server.execute i get an error
Server object error 'ASP 0214 : 80004005'
Invalid Path parameter
test.asp, line 132
The Path parameter excedes the maximum length allowed.
esthera
09-13-2005, 08:16 AM
server.execute keeps returning errors.
If I do at the end of the script response.redirect then that does what I want but i don't really want to redirect.... but I need to call teh php page (not asp) with those parameters from the asp.
What can I do?
Roelf
09-13-2005, 08:38 AM
i don't think xmlhttp will work
Why not?
From the serverside asp-part, create an xmlhttp object which calls your php page, sending your data to this page. should work
esthera
09-13-2005, 08:43 AM
how does that work?
I thought that the xmlhttp is to pull from a page...
I have a asp that when redirecting to the php works but I don't want to really redirect to the php just to call it with teh right fields...
can you help me out here? Will the xmlhttp method work for this?
esthera
09-13-2005, 09:02 AM
I think I have it
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
Response.write xmlhttp.responseText
set xmlhttp = nothing
Thanks for your help.
Roelf
09-13-2005, 09:49 AM
yeah, but you dont have to write out the responsetext. perhaps call a function on readystatechange which reads the response from the php page. You can use this to validate the correct arrival of your data. Just let the php page return a simple xml-string which indicates success or failure
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.