How do I make a PHP call whenever a form element is clicked?

Posted by thinkswan on Stack Overflow See other posts from Stack Overflow or by thinkswan
Published on 2010-03-18T08:32:49Z Indexed on 2010/03/18 8:41 UTC
Read the original article Hit count: 423

Filed under:
|
|
|
|

I have a jQuery colorbox opened over top of my webpage (with a <select> drop down list) and I'd like to make an AJAX call every time a new <option> is selected from the drop down.

I have the following code, but it's not picking up the select event.

$('#cboxLoadedContent select[name=parent]').live('select', function() {
  $.get("edit.php", { fn: 'getFormatLevel', parent: $('select[name=parent]').val() }, function(data) {
    alert("Data Loaded: " + data);
  });
});

Any ideas why this isn't even recognizing my selector?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript