jQuery submit workaround -


I found something interesting in jQuery, and I wanted to run it by some people which is better than I understand Is there a solution for that, so I want to post back the scroll position of the page when submitting all the forms on my page. I can do the following:

  $ ('form'). Submit (function () {$ (this) .append ('& lt; input type = "hidden" name = "Scroll_position" value = "' + $ (document) .scrollTop () + '" / & gt; ); Verification Back;}  

This works when users click or press on the Deposit Button, but there are times when I set a fire. () Event. Example: < Click on / p>

  $ ('button') (function () {... / / here is doing something special ... $ (this) .Parents ('form') [0] Submit ();}  

How do I get my custom callback Whenever a page is submitted, it can still be called, even though a. () Call or user is submitting a form?

Click the
  $ ('button'). (Function () {... // something is doing here ... var form = $ (this) .parents ('form') [0 ]; $ (Form) .submit ();}  

Happy coding.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -