.net - ASP.Net Ajax PageMethod - retain reference to DOM object -


When an ASP.Net pagemouth is called, we call this as:

  Function doSomething (HtmlElement) {PageMethods.GetText (onSuccess, onFailure); }  

What is the best way to maintain the context of HTMLElement in the above example, so that we can continue to work on the onsite success method with it?

Thanks for any help in advance

Due to the fact that Javascript Supports, you will not have to worry about retaining the context of the element; Since it has been fundamentally brought into success (assuming that you have written an unknown function in place of success).

Simply put, whatever function you put for you The success can already be used in the context of the element, passed as a parameter.

doSomething (htmlElement) {PageMethods.GetText (function (x, y) {var v = htmlElement / * will not be empty}, failure on); }

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -