Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a function from another domain

Status
Not open for further replies.

BuzzerTom

Technical User
Joined
Aug 20, 2003
Messages
35
Location
BE
Hi all,

Ik have 2 websites, each on another server. I need a value from a function from one server on the other. Is there a way to include a file with the full path. I tried this and it doesn't work:

<!-- #INCLUDE file=" -->

Any help will be apreciated,
Tom
 
Include file commands don't use a url, they use a normal pathname.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
I was afraid it wouldn't work like that. Do you have a suggestion on how I could access the function on the other server then ?

Or will I be forced to use a querystring?

Thanx
Tom
 
Thanx,

But if it was that easy I wouldn't bother you guys with it. The function retrieves data from a database on the other server, so I can't put the function on the other server, it needs the database.

Greetz
Tom
 
You can make an ASP page on the remote server that will allow you to use it as a remote function call.

Just make a simple ASP page without any fancy user interface. The arguments for this remote procedure call can come through the querystring.

So in your ASP just read the querystring to get the input, run the function, and Response.Write only the results out with no other formatting.

Then you can call it with the server version of the xmlhttp object.

I guess you could format the output in xml instead of plain text, but i wouldn't bother unless it is a good deal of data. You mention a database so perhaps you could persist a recordset to xml and send it back that way and inflate it back on the calling end.
 
I have had a similar problem and this link (which jemminger was kind enough to assist with) may offer some useful help as well. thread216-899295

I believe it is his last post in the thread which may benefit you. Good luck!

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top