 
			
				16.07.2012, 15:36
			
			
			
		  
	 | 
	
		
		
		
			  | 
			
			
				
				
				 Профессор 
				
				
				
				
	
 
 
 
			 | 
			  | 
			
				
				
					Регистрация: 04.10.2011 
					
					
					
						Сообщений: 357
					 
					
					
			
		
 
		 
		
			 | 
		 
		 
		
	 | 
	
	
	
		
		
		
		
		featherEditor is undefined без аякса работает! 
так загружаю html
 
$("#create").click(function()
{
$("#wrapper").load("create.php");
}
дальше php файл 
выводит
 
	
 
	| 
		
			 Цитата: 
		
	 | 
 
	
		if (isset($_POST['url'])) 
	{ 
		$url = SiteScreenshot ($_POST['url']); 
		$full_url = "http://delfun.ru/".$url; 
		echo " 
<!-- Load Feather code --> 
<script type=\"text/javascript\" src=\"http://feather.aviary.com/js/feather.js\"></script> 
 
<!-- Instantiate Feather --> 
<script type=\"text/javascript\"> 
 
var featherEditor = new Aviary.Feather({ 
        apiKey: 'd8d50760e', 
        apiVersion: 2, 
        tools: 'stickers,text,draw', 
        appendTo: '', 
        onSave: function(imageID, newURL) { 
            var img = document.getElementById(imageID); 
            img.src = newURL; 
        } 
    }); 
 
function launchEditor(id, src) { 
        featherEditor.launch({ 
            image: id, 
            url: src 
        }); 
        return false; 
    } 
 
</script> 
 
<div id=\"injection_site\"></div> 
 
<img id=\"image1\" src=\"$full_url\"/> 
 
<!-- Add an edit button, passing the HTML id of the image and the public URL ot the image --> 
<p><input type=\"image\" src=\"http://advanced.aviary.com/images/feather/edit-photo.png\" value=\"Edit photo\" onclick=\"return launchEditor('image1', '$full_url');\" /></p>"; 
	} 
else 
	{ 
		echo " 
			<script type='text/javascript'> 
			$('#button_show').click(function() 
					{ 
						var temp_url = $('#insert_url').val(); 
						if (temp_url=='') 
							{ 
								alert('Введите url'); 
							} 
						else 
							{ 
								$.ajax({ 
									async: false, 
									type: 'POST', 
									url: 'create.php', 
									data: 'url=' + temp_url, 
									success: function(data){ 
										$('#screen').html(data); 
									} 
								}); 
							} 
					} 
				); 
			</script> 
			<div> 
			<input id='insert_url' type='url' placeholder='Пример: delfun.ru'/><button id='button_show'>Показать</button> 
				<div id='screen'> 
				</div> 
			</div>"; 
	}
	 | 
 
	
 
  
		
	
		
		
		
		
		
		
	
		
			
			
	
			
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 |