• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Question about Jquery triggers.

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am wondering what are some of the values that triggers can have?

Like I don't see a list really.

I found in someones code that you can use "update" I however am not sure if this just updates that control or the whole page. What other values can I use with a trigger.
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any custom event name that you've registered with bind. Of course, be sure not to encroach on the standard event names.
 
Michael Hubele
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Any custom event name that you've registered with bind. Of course, be sure not to encroach on the standard event names.



When you call "update" though like $("table").trigger("update");

Does that only update that table?

 
Bear Bibeault
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It will do whatever that custom event is written to do.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Michael Hubele wrote:

Bear Bibeault wrote:Any custom event name that you've registered with bind. Of course, be sure not to encroach on the standard event names.



When you call "update" though like $("table").trigger("update");

Does that only update that table?



Wouldn't it be easy to test that out?

Eric
 
Michael Hubele
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:

Michael Hubele wrote:

Bear Bibeault wrote:Any custom event name that you've registered with bind. Of course, be sure not to encroach on the standard event names.



When you call "update" though like $("table").trigger("update");

Does that only update that table?



Wouldn't it be easy to test that out?

Eric



I been testing it out but since I am using it on a asp.net gridview it keeps making my whole page refresh. So I am trying to figure out if thats what it should be doing or if this is happening because of using asp.net controls.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well if it is refreshing sounds like you are letting whatever you are clicking to autopostback to the server.


Eric
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And for my point on trying it out. It is always wise to step away from what you are developing and spend 5 minutes whipping up a simple html representation of what you want to do and try it out. That way you can track down the issue in a systematic way.

Eric
 
Michael Hubele
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:Well if it is refreshing sounds like you are letting whatever you are clicking to autopostback to the server.


Eric



Well I am using a html submit button when I use an html table I don't get a postback.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are not posting back the form, why are you using a submit button. Use a plain button.

Normally if there is a JavaScript error on a submit button, it causes the page to refresh. By swapping to a normal button, you would see the error.


Eric
 
Every snowflake is perfect and unique. And every snowflake contains a very tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic