0

hi frnds..


i am using while loop for getting more records..in this having div..i need to change div name dynamically...but right now i cant do that code...plz change the below code.....

<DIV id="div_MoviePicRate" name="div_MoviePicRate" class="text2_grey" align="left">&nbsp;
<IMG alt="I Agree, Your life Sucks" src="images/up.png"  style="cursor:pointer" border="0" onclick="javascript:TF_RateThumb(<?php echo $p_id; ?>,<?php echo $f_id; ?>,1,&#39;[B]div_MoviePicRate&#39[/B];);">

here main problem is , my having having more number of records on same div name....how can i create dynamic div with different names....


javascript code..

function TF_RateThumb(MasterPicID,PicID,RateVal,divObj)
	{
	    /
		showHintPoll('picturerate.php?cid='+MasterPicID+'&pid='+PicID+'&rate='+RateVal+'&',divObj,'-1');
	}
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by i-hate-blue
0

You could add an incremental variable to the code, such as this one :

$i = 1;
foreach($d_array as $da) {
   echo '<div id="name_of_'.$i.'">Content at '.$i.'</div>';
   $i++;
}

hope you know what i mean.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.