Generic Handler With ICallbackEventHandler

Last post 12-14-2007 2:40 PM by rrobbins. 2 replies.

Sort Posts:

  • Generic Handler With ICallbackEventHandler

    12-14-2007, 11:24 AM
    • Loading...
    • rrobbins
    • Joined on 06-19-2002, 6:35 AM
    • Williamsport, PA 17701
    • Posts 65

    Is it possible to create a generic handler that implements the ICallbackEventHandler interface? I have a generic handler that returns a sting of JSON data but I cannot figure out how to use that data in JavaScript without a callback function. Google and Yahoo! have web services that return JSON data and support callback functions so I know how to use their data in JavaScript. 

    Robert S. Robbins
    Web Developer
    http://www.williamsportwebdeveloper.com/
  • Re: Generic Handler With ICallbackEventHandler

    12-14-2007, 1:59 PM
    • Loading...
    • A1ien51
    • Joined on 05-06-2005, 6:46 PM
    • MD USA
    • Posts 2,852

     Is there a reason you want to use an ICallbackEventHandler when you can do it pretty easily without it.

     Here is an example of calling the Yahoo Traffic API
    http://www.pascarello.com/examples/JsonYahooExample.html 

    Eric 

    Coauthor of Ajax In Action [#1 Computer and Internet book on Amazon for 2006]

    If you get an answer to your question, please mark it solved so people don't waste time reading already answered questions!
  • Re: Generic Handler With ICallbackEventHandler

    12-14-2007, 2:40 PM
    • Loading...
    • rrobbins
    • Joined on 06-19-2002, 6:35 AM
    • Williamsport, PA 17701
    • Posts 65

    A1ien51:

     Is there a reason you want to use an ICallbackEventHandler when you can do it pretty easily without it.

    I am not using the Yahoo! API. I am trying to create my own web service proxy which will convert any RSS feed into JSON. I have the web service working as a generic handler. The only problem is that I cannot figure out how the client JavaScript can use that JSON data without a callback function. I've seen how to use JSON data from Google and Yahoo! in client JavaScript using a callback function. I cannot find any sample code for creating a callback function in a generic handler. Right now I'm trying to use Jayrock.

    Robert S. Robbins
    Web Developer
    http://www.williamsportwebdeveloper.com/
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter