PDA

View Full Version : How generate the ID for the dynamic images with the help of Magic Zoom


swetha123
12-12-2008, 11:08 AM
hello,

can one help me


I am using Magic Zoom to zoom my images in a particular position
here is the link they explained in the three lines how to zoom image in a particular position? please see it



In this link u see only the Zoomed Area position part of explanation
http://www.magictoolbox.com/magiczoom_integration/
after seeing that link hope you may got idea



they passed the Id="zoom4" in <a> tag


<a href="big.jpg" rel="zoom-position: custom" id="zoom4"><img src="small.jpg" /></a>


and in the <div> tag they passed
same id with suffixed -big


<div class="yourstyle" id="zoom4-big"></div>



this we can done for the static images with different Id's,
but for the dynamic images we need to provide the Id by getting it from the database(Each record in database usually has an ID)


rite?


here is my problem i got all the Id' from my database and stored them in a variable called $styl (below you an see)
now i need to suffix that variable with '-big' in the div tag
i am confused with that please help me
i tried to suffix that but i can't see the zoom image


<style type="text/css">
.yourstyle
{
position:absolute;
}
</style>



<div class="yourstyle" id="<?php echo trim($styl);?>"+"-big">



<?php


$query2="select style from styles";



$sql=mysql_query($query2);



$result2=mysql_num_rows($sql);



$obj3=mysql_fetch_object($result3);



$styl=$obj3->style; //Id stored in this varibale $styl



echo '<td><a title="'.$styl.'" href="'.$big.'" class="MagicZoom" rel="zoom-


position:custom;zoom-height:450px;zoom-width:385px;"



id="'.trim($styl).'"><img width="170px" height="100px" src=" ' . $cimage . ' "



/></a></td>';



?>





please tell me what wrong am i doing



hope u understand my problem


waiting for the reply



thanks
swetha