[CLOSED] ASHX handler - returning javascript and other questions

  1. #1

    [CLOSED] ASHX handler - returning javascript and other questions

    Hi,

    I am very new to EXT.net so please forgive these beginner questions

    I am writing panels where it's important that I limit the amount of postbacks (as they are dynamically generated forms that need to be recreated at every postback) - so I was thinking that I would send the server destined data to an ashx handler who's job it is to evaluated the data and return javascript that would then be evaluated on the client

    so questions

    1. if i have a event listener (say a button click) that does a event with the url being a ashx handler, does this invoke a postback of the page ?

    2. if not how to i return javascript from my handler and have that jscript evaluated to dynamically update the page - please provide a simple example

    3. if so can you suggest another alternative and provide a simple example ?

    Thanks

    Mac
    Last edited by Daniil; Nov 05, 2013 at 8:36 AM. Reason: [CLOSED]
  2. #2
    Hi @macinator,

    First of all, IMHO, you are on the right way. I mean avoiding PostBacks and using ASHX handlers instead.

    Quote Originally Posted by macinator View Post
    1. if i have a event listener (say a button click) that does a event with the url being a ashx handler, does this invoke a postback of the page ?
    No, it doesn't.

    Quote Originally Posted by macinator View Post
    2. if not how to i return javascript from my handler and have that jscript evaluated to dynamically update the page - please provide a simple example

    3. if so can you suggest another alternative and provide a simple example ?
    It is best to use DirectEvents or DirectMethods. Here are examples with WebServices.
    https://examples2.ext.net/#/Events/D...ts/WebService/
    https://examples2.ext.net/#/Events/D...ds/WebService/

    There won't be any principal difference with ASHXes.

Similar Threads

  1. [CLOSED] GridPanel loading from ASHX handler 2.0
    By rthiney in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 11, 2013, 3:36 PM
  2. Replies: 2
    Last Post: Jun 03, 2012, 4:18 PM
  3. [CLOSED] Correct DirectResponse from an ashx handler
    By anup in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Jun 30, 2011, 10:58 AM
  4. Replies: 0
    Last Post: Mar 21, 2011, 3:55 PM
  5. Handler javascript's Error
    By Krisller in forum 1.x Help
    Replies: 3
    Last Post: Jun 17, 2010, 1:33 PM

Posting Permissions