$(function() { $('#join_form').bind('submit',function() { return check_form(this); }); $('#join_form')[0].elements[2].focus(); if (ta_len>0) { $('#join_form textarea').bind('keyup',function() { myid=$(this).attr('id'); remaining=ta_len-$(this).val().length; if (remaining<0) { $(this).val($(this).val().substr(0,$(this).val().length+remaining)); remaining=0; } $('#'+myid+'_chars').html(remaining.toString()); }).bind('blur',function() { myid=$(this).attr('id'); remaining=ta_len-$(this).val().length; if (remaining<0) { $(this).val($(this).val().substr(0,$(this).val().length+remaining)); remaining=0; } $('#'+myid+'_chars').html(remaining.toString()); }); } $('#check_username').click(function() { req_check_username(); return false; }); }); function req_update_location(str_field,val) { $.post(baseurl+'/ajax/location.php', {'field':str_field,'val':val}, function(data) { if (data!=null && data!='') { allopts=data.split("\n"); str_field=allopts[0]; toshow=allopts[1].split('|'); $('#row_'+str_field+'state').addClass('invisible').removeClass('visible'); $('#row_'+str_field+'city').addClass('invisible').removeClass('visible'); $('#row_'+str_field+'zip').addClass('invisible').removeClass('visible'); for (i=0;i3) { to_update=$('#'+str_field+allopts[2])[0]; to_update.options.length=0; for (i=3;i