Random tab in variable?
Random tab in variable?
- $('[id="btn_gen"]').text('Generating...');
- $('[id="btn_gen"]').attr('disabled','disabled');
- user = $('[name="name"]').val();
- $.ajax({
- url: 'jsinc_generate.php?username='+user
- }).done(function( sig ){
- if(sig == 'floodlimit'){
- alert('You cannot create anther signature until it\'s been ten minutes since the time of your last generated signature.');
- }else{
- $('[id="gen_form"]').toggle('slow', function(){
- url = 'http://novatops.hostzi.com/sigs/'+ sig +'.png';
- $('[id="gen_form"]').html('<img src="'+url+'"></img><br/><br/><table><tr><td><b>Direct:</b></td><td><input type="text" size="40" value="'+url+'"/></td></tr><tr><td><b>BBCode:</b></td><td> <input type="text" size="40" value="[img]'+url+'[/img]"></td></tr><tr><td><b>HTML:</b></td><td><input type="text" size="40" value="<img src=\''+url+'\' alt=\''+ user +'\' />"/></td></tr></table>');
- $('[id="gen_form"]').toggle('slow');
- });
- }
- });
In the above code, it seems there is a random trailing tab in the
sig variable which is returned from the AJAX call. Any ideas as to why this is? I checked the output from the PHP page, and there's no extra spaces/tab.