use a webservice method in javascript

Last post 05-16-2008 4:43 PM by Anneleen. 5 replies.

Sort Posts:

  • use a webservice method in javascript

    05-16-2008, 10:46 AM
    • Member
      24 point Member
    • Anneleen
    • Member since 04-14-2008, 7:29 AM
    • Belgium
    • Posts 38

     Hi,

     

    Is it possible to use a method from a webservice in a javascript?  

    I'm using a script that makes my picture sliding over my page.  I call the picture in a method in a webservice.  

     

    1     <WebMethod()> _
    2        Public Shared Function GetImages(ByVal map As String, ByVal title As String) As String()
    3            Dim myImages() As String = Nothing
    4            Try
    5                Dim mySlides() As String = Directory.GetFiles(HttpContext.Current.Server.MapPath("~\Documents\Images\" & map & "\"))
    6                myImages = New String(mySlides.Length - 1) {}
    7                For i As Integer = 0 To mySlides.Length - 1
    8                    myImages(i) = "<img src='~\Documents\Images\" & map & "\" & Path.GetFileName(mySlides(i)) & "' border=1>"""
    9                Next
    10   
    11           Catch ex As Exception
    12               DataAccessExceptionHandler.HandleException(ex.Message)
    13           End Try
    14           Return myImages
    15       End Function
    

      Can somebody help me?

     

    Greetz 

  • Re: use a webservice method in javascript

    05-16-2008, 11:12 AM
    • Member
      293 point Member
    • tsantos
    • Member since 06-17-2005, 10:31 PM
    • Toronto, Canada
    • Posts 61
    for(int i=0;i > 1;i--)
    {
        std::cout << "Hello\n";
    }
  • Re: use a webservice method in javascript

    05-16-2008, 12:22 PM
    • Member
      24 point Member
    • Anneleen
    • Member since 04-14-2008, 7:29 AM
    • Belgium
    • Posts 38

     Hi

     

    I really don't get this.  Is there an easy way out?  

     

    Greetz

     

    Anneleen 

  • Re: use a webservice method in javascript

    05-16-2008, 4:22 PM
    • Member
      293 point Member
    • tsantos
    • Member since 06-17-2005, 10:31 PM
    • Toronto, Canada
    • Posts 61

    id say its not too complicated..

    i can send  you a sample app that calls a webservice using javascript/mootools so you can use as a sample

    i'll try to host it somewhere, then I post the link here.. or i can send to your email..

    for(int i=0;i > 1;i--)
    {
        std::cout << "Hello\n";
    }
  • Re: use a webservice method in javascript

    05-16-2008, 4:41 PM
    Answer
    • Member
      293 point Member
    • tsantos
    • Member since 06-17-2005, 10:31 PM
    • Toronto, Canada
    • Posts 61

    Here is a link to Live SkyDrive thing..

    http://cid-b5ca1886166d58b7.skydrive.live.com/self.aspx/Public/MootoolsAndWebservices.zip

    try to access and let me know if you have any problems..

    to test it, get the service running on your machine, then go to the file script.js and update the variable "serviceAddress" to the actual address of the webservice on your machine..

    i hope it helps

    for(int i=0;i > 1;i--)
    {
        std::cout << "Hello\n";
    }
  • Re: use a webservice method in javascript

    05-16-2008, 4:43 PM
    • Member
      24 point Member
    • Anneleen
    • Member since 04-14-2008, 7:29 AM
    • Belgium
    • Posts 38

    That would be great!

     

    maybe it is easy to send an email

     

    Thx



     

Page 1 of 1 (6 items)