tags:

views:

30

answers:

2

Hi i have a textbox that is hidden.

And i chenge the value based on clicks inside the page.

I want to track somehow the value so when value is 0 to call a ajax.

i tried using .change but is not working

Does anyone have an idea

A: 

You need to hook up the click events that are changing the hidden field's value. In the handler for those events, call a function that checks the hidden value and call your Ajax function if it's 0.

Jamie Ide
A: 

Have you tried this?

$("#something").click(function(){
 // do something
 if($("#yourTextBox").val()==="0"){
 //do your ajax
 }
}
fmsf