views:

17

answers:

1

Dear friends
I try to call my webservice but I cant!
when I put it in root directory it possible but when I put it in sub directory it's impossible to call it!
and one more problem that I face with it,my javascript file stay in 3 sub directory like ../../../myjsfile.js

when I put my webservice address like this ../../../webservice.asmx it dont work but when I change it to a full address it work.anybody know what is my problem?

I put a picture from my directory here

alt text

A: 

I am assuming that you are trying to call the web service with JavaScript.

When calling the asmx file with JavaScript, the location of the asmx file is relative to the location of the calling page not the Javascript file. So if you are calling it in /default.aspx file, you do not need to specify .. (parent path), but Services/CompanyServices.asmx.

airmanx86
your guess is true,I call my webservice from my java script file,I dont want to mix my code,I try to seprate all the part from the other,it's kind of 3 layer design.so in this case what's yr idea to handle this problem?
rima