<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[posizionamento immagine con jquery]]></title><description><![CDATA[<p dir="auto">Non riesco a far posizionare l'anteprima dell'immagine prendendo le variabili dal db, ho seguito quello che c'è scritto su questa pagina, ma non funziona, l'immagine viene sempre caricata al centro, non segue le coordinate che vengono dal db, le ignora proprio.</p>
<p dir="auto"><a href="http://odyniec.net/projects/imgareaselect/examples-callback.html" rel="nofollow ugc">odyniec.net/projects/imgareaselect/examples-callback.html</a></p>
<p dir="auto">(leggete la parte in fondo alla pagina)</p>
<p dir="auto">e qui è quello che ho scritto io:</p>
<pre><code class="language-php">&lt;?php 
$sql_fotoarticolo = "SELECT c_art_articolo.*, c_art_fotoarticolo.*, c_art_fotoarticolo.foto AS photogallery  
            
            FROM c_art_fotoarticolo
            
            INNER JOIN c_art_articolo
            ON c_art_fotoarticolo.id_art_articolo = c_art_articolo.id_art_articolo 
                
             WHERE  c_art_articolo.id_art_articolo = '".$id."' 
            ORDER BY c_art_fotoarticolo.id_art_fotoarticolo ASC";  
$result_fotoarticolo = mysql_query($sql_fotoarticolo,$conn) or die ("errore ".mysql_error());

$row2_fotoarticolo=mysql_fetch_array($result_fotoarticolo)
?&gt; 


&lt;script type="text/javascript" src="script/script_centra_immagine/jquery-1.5.2.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="script/script_centra_immagine/jquery.imgareaselect.pack.js"&gt;&lt;/script&gt;




&lt;script type="text/javascript"&gt;
$('img').imgAreaSelect({
   x1: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_x1'] ?&gt;,
   y1: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_y1'] ?&gt;,
   x2: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_x2'] ?&gt;,
   y2: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_y2'] ?&gt;,
   w: &lt;?php echo $row2_fotoarticolo['foto_dimensioni_w'] ?&gt;,
    h: &lt;?php echo $row2_fotoarticolo['foto_dimensioni_h'] ?&gt;,
   onInit: preview2,
   onSelectChange: preview2
});
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
$(document).ready(function () { 
$('#preview2').imgAreaSelect({ onSelectEnd: function (img, selection) { 
$('input[name=x1]').val(selection.x1); 
$('input[name=y1]').val(selection.y1); 
$('input[name=x2]').val(selection.x2); 
$('input[name=y2]').val(selection.y2); 
$('input[name=w]').val(selection.w); 
$('input[name=h]').val(selection.h); 
} }); 
});
&lt;/script&gt;



&lt;div class="frame" style="margin: 0 1em; width: 149px; height: 149px;"&gt;
&lt;div id="preview2" style="width: 149px; height: 149px; overflow: hidden;"&gt;

&lt;a href="images_photogallery/&lt;?=$row2_fotoarticolo['photogallery']?&gt;" rel="lyteshow[foto]" title="&lt;?=$row2_fotoarticolo['titolo_foto']?&gt;"&gt;
&lt;img src="images_photogallery/&lt;?=$row2_fotoarticolo['photogallery']?&gt;" style="height: 149px;" border="0"&gt;
&lt;/a&gt;
 
&lt;/div&gt;
&lt;/div&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/topic/150364/posizionamento-immagine-con-jquery</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 06:08:21 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/150364.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 Apr 2011 15:46:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to posizionamento immagine con jquery on Mon, 02 May 2011 11:59:43 GMT]]></title><description><![CDATA[<p dir="auto">se vai in fondo alla pagina che ti ho linkato pare che spieghi come si fa:</p>
<p dir="auto"><a href="http://odyniec.net/projects/imgareaselect/examples-callback.html" rel="nofollow ugc">odyniec.net/projects/imgareaselect/examples-callback.html</a></p>
<p dir="auto">e io ho seguito attentamente il tutorial ma a me non funziona boh...</p>
]]></description><link>https://dev.connect.gt/post/992522</link><guid isPermaLink="true">https://dev.connect.gt/post/992522</guid><dc:creator><![CDATA[prinzart]]></dc:creator><pubDate>Mon, 02 May 2011 11:59:43 GMT</pubDate></item><item><title><![CDATA[Reply to posizionamento immagine con jquery on Mon, 02 May 2011 11:25:53 GMT]]></title><description><![CDATA[<p dir="auto">L'ho potuto provare solo ora, ma purtroppo non va.</p>
<p dir="auto">Sono giorni che ci sto sbattendo la testa ma proprio non mi funziona.</p>
<p dir="auto">Tutta la prima parte del lato admin dove si sposta l'immagine e si salva sul db funziona correttamente, invece l'ultima parte, proprio non riesco a farla funzionare, cioè quella dove l'utente dovrebbe vedere l'immagine già posizionata perchè prende le coordinate dal db precedentemente inserite dall'admin.</p>
]]></description><link>https://dev.connect.gt/post/992521</link><guid isPermaLink="true">https://dev.connect.gt/post/992521</guid><dc:creator><![CDATA[prinzart]]></dc:creator><pubDate>Mon, 02 May 2011 11:25:53 GMT</pubDate></item><item><title><![CDATA[Reply to posizionamento immagine con jquery on Thu, 28 Apr 2011 16:25:15 GMT]]></title><description><![CDATA[<p dir="auto">Grazie domani ci provo</p>
]]></description><link>https://dev.connect.gt/post/992524</link><guid isPermaLink="true">https://dev.connect.gt/post/992524</guid><dc:creator><![CDATA[prinzart]]></dc:creator><pubDate>Thu, 28 Apr 2011 16:25:15 GMT</pubDate></item><item><title><![CDATA[Reply to posizionamento immagine con jquery on Thu, 28 Apr 2011 11:24:03 GMT]]></title><description><![CDATA[<p dir="auto">Così:</p>
<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function () {

$('img').imgAreaSelect({
   x1: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_x1'] ?&gt;,
   y1: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_y1'] ?&gt;,
   x2: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_x2'] ?&gt;,
   y2: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_y2'] ?&gt;,
   w: &lt;?php echo $row2_fotoarticolo['foto_dimensioni_w'] ?&gt;,
    h: &lt;?php echo $row2_fotoarticolo['foto_dimensioni_h'] ?&gt;,
   onInit: preview2,
   onSelectChange: preview2
});
 
$('#preview2').imgAreaSelect({ onSelectEnd: function (img, selection) { 
$('input[name=x1]').val(selection.x1); 
$('input[name=y1]').val(selection.y1); 
$('input[name=x2]').val(selection.x2); 
$('input[name=y2]').val(selection.y2); 
$('input[name=w]').val(selection.w); 
$('input[name=h]').val(selection.h); 
} }); 
});
&lt;/script&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/992520</link><guid isPermaLink="true">https://dev.connect.gt/post/992520</guid><dc:creator><![CDATA[ayrton2001]]></dc:creator><pubDate>Thu, 28 Apr 2011 11:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to posizionamento immagine con jquery on Wed, 27 Apr 2011 11:07:33 GMT]]></title><description><![CDATA[<p dir="auto">No, non ho provato, come lo inserisco?</p>
<pre><code class="language-php">&lt;script type="text/javascript"&gt;
$('img').imgAreaSelect({
   x1: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_x1'] ?&gt;,
   y1: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_y1'] ?&gt;,
   x2: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_x2'] ?&gt;,
   y2: &lt;?php echo $row2_fotoarticolo['foto_inquadratura_y2'] ?&gt;,
   w: &lt;?php echo $row2_fotoarticolo['foto_dimensioni_w'] ?&gt;,
    h: &lt;?php echo $row2_fotoarticolo['foto_dimensioni_h'] ?&gt;,
   onInit: preview2,
   onSelectChange: preview2
});
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
$(document).ready(function () { 
$('#preview2').imgAreaSelect({ onSelectEnd: function (img, selection) { 
$('input[name=x1]').val(selection.x1); 
$('input[name=y1]').val(selection.y1); 
$('input[name=x2]').val(selection.x2); 
$('input[name=y2]').val(selection.y2); 
$('input[name=w]').val(selection.w); 
$('input[name=h]').val(selection.h); 
} }); 
});
&lt;/script&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/992523</link><guid isPermaLink="true">https://dev.connect.gt/post/992523</guid><dc:creator><![CDATA[prinzart]]></dc:creator><pubDate>Wed, 27 Apr 2011 11:07:33 GMT</pubDate></item><item><title><![CDATA[Reply to posizionamento immagine con jquery on Wed, 27 Apr 2011 10:12:35 GMT]]></title><description><![CDATA[<p dir="auto">Ciao prinzart,<br />
Hai provato ad inserire "$('img').imgAreaSelect" nel $(document).ready ?</p>
]]></description><link>https://dev.connect.gt/post/992519</link><guid isPermaLink="true">https://dev.connect.gt/post/992519</guid><dc:creator><![CDATA[ayrton2001]]></dc:creator><pubDate>Wed, 27 Apr 2011 10:12:35 GMT</pubDate></item></channel></rss>