recognize change of input elements from outside of the ajax call

recognize change of input elements from outside of the ajax call

Hi Guys,

i am relatively new in coding with jquery, but little more than beginner skills in php ;)

In short ..
 
  1. user upload file (spreadsheet)
  2. all worksheets are extracted and turned back as input:radio
  3. if user selects a worksheet all avaiable columns are turned back as input:checkbox
  4. if user selects a specific count of columns he will be asked if the first row contains the table headers
  5. if not, the user is promtpted to specify the headers in input:text for each chosen column
  6. if its all fine, the user will finally get his editable table


First .. the functunality is okay, but there are probably some design issues in my code.

The structure looks like this:

ajax : upload file and return <input type="radio" name="sheet"...> for each worksheet

.done(...){

$('#sheet).change(function(){

....

ajax : return columns to worksheet <input type="checkbox" name="column"...> 

.done(..){

$('#column).change(function(){

....

ajax : ...

.done...



I think you guys recognize the structure of my code. Honestly it looks terrible :(

Is it possible to observe the state of a NEWLY generated input element from outside (for example from another observeInputState.js)?

All my tries end up with no reaction from the system, i guess this is because the observeInputState.js in loaded before the new input element is generated...

Thanks for advice,

Matze