I'm building a multi-part form. Each part executes a new script. When each script is executed it will check for required data. If said data is missing it will return a string "false"
part 1 fails correctly (calls highlight()) but part 2 just spits out "false" bypassing the highlight function as if data !== false. I've tried clearing data but this does not seem to work. Any ideas?
Thanks
$('.submit').live('click', function(){
var bclick = $(this);
var frm = "../../scripts/retain-" + $(this).attr('rel') + ".php";
var fields = $('#retain-form').serialize();
$.post(frm, fields, function(data){
if(data == 'false'){
highlight();
data = '';
}else{
var nForm = $(bclick).attr('rel');
nForm = parseInt(nForm[4]) + 1;
$(bclick).attr('rel', "form" + nForm);
$('#retain-steps').html(data);
}
});
})