locked
Microsoft JScript runtime error: 'WebService' is undefined ? RRS feed

  • Question

  • function InitializeService(){

    // This line i a getting this error any one help.........

             service.useService('http://localhost:4656/WebToJson.asmx?op=GetAge');
         }
         var StrYear, StrMonth, StrDay;
         function GetAge(){
          StrYear = document.DemoForm.StringYear.value;
          StrMonth = document.DemoForm.StringMonth.value;
          StrDay = document.DemoForm.StringDay.value;
          service.GetAgeService.callService("GetAge", StrYear, StrMonth, StrDay);

         }

        
    • Moved by Carl Cai Monday, September 16, 2013 1:51 AM if post it in asp.net forum will get better support
    Friday, September 13, 2013 10:22 AM

Answers

  • Hi,

    Welcome to the MSDN forum!

    I’m afraid that it is not the correct forum about this issue, since this forum is to discuss Visual Studio Diagnostics(Debugger, Profiler, IntelliTrace), Discuss and ask questions about the Visual Studio Debugging tools, Visual Studio Profiler tools, and Visual Studio Ultimate IntelliTrace.

    You are more likely to get more efficient responses to ASP.NET issues at http://forums.asp.net where you can contact ASP.NET experts who can give you more suggestions about using JScript.

    Regards.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Proposed as answer by Just Karl Tuesday, September 17, 2013 8:17 PM
    • Marked as answer by Just Karl Wednesday, September 25, 2013 2:41 PM
    Monday, September 16, 2013 1:51 AM

All replies

  • Change the line like this

          service.useService('http://localhost:4656/WebToJson.asmx?op','GetAgeService');

    Nice day. : )

    remember make the reply as answer and vote the reply as helpful if it helps.

    Saturday, September 14, 2013 2:31 AM
  • Hi,

    Welcome to the MSDN forum!

    I’m afraid that it is not the correct forum about this issue, since this forum is to discuss Visual Studio Diagnostics(Debugger, Profiler, IntelliTrace), Discuss and ask questions about the Visual Studio Debugging tools, Visual Studio Profiler tools, and Visual Studio Ultimate IntelliTrace.

    You are more likely to get more efficient responses to ASP.NET issues at http://forums.asp.net where you can contact ASP.NET experts who can give you more suggestions about using JScript.

    Regards.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Proposed as answer by Just Karl Tuesday, September 17, 2013 8:17 PM
    • Marked as answer by Just Karl Wednesday, September 25, 2013 2:41 PM
    Monday, September 16, 2013 1:51 AM