i have php variable which has to be passed inside the javascript...
this is my code..
<ul class="frnd_lst">
<?php
for($i=1; $i<11; $i=$i+1)
{
?>
<li id="color" class="frnd_lst_li" onmouseover="color_in()" onmouseout="color_out()">
<div align="left" style="float:left; margin:5px;"><a href=""><img src="Images/9tharasample.png" alt="" /></a></div>
<ul class="namelist1">
<div align="left" class="linespace1" style="float:left;"><!------ ----------></div>
<li class="dob1"><div style="float:left; text-align:right; width:10px;"></div><a href="">Siva Sundharam</a></li>
<br />
<br />
<br />
<li class="dob"><div style="float:left; text-align:right; width:10px;"></div>(Pondicherry, India)</li>
<br />
<br />
<br />
<li class="dob"><div style="float:left; text-align:right; width:10px;"></div>
<a href="">Profile</a> | <a href="">Playlist</a> | <a href="">Friends</a> | <a href="">Quarks</a></li>
</ul>
</li>
<?php } ?>
</ul>
here the javascript
function color_in()
{
document.getElementById("color").style.backgroundColor = "#DDDBD7";
//document.getElementById("color").src = "loading.gif";
//document.getElementById("list").style.backgroundColor = "#DDDBD7";
}
function color_out()
{
document.getElementById("color").style.backgroundColor = "#FFFFFF";
//document.getElementById("list").style.backgroundColor = "#FFFFFF";
}
Now I need to pass the $i variable in js to make that every element of li shows the on mouseover property..
this is my code..
<ul class="frnd_lst">
<?php
for($i=1; $i<11; $i=$i+1)
{
?>
<li id="color" class="frnd_lst_li" onmouseover="color_in()" onmouseout="color_out()">
<div align="left" style="float:left; margin:5px;"><a href=""><img src="Images/9tharasample.png" alt="" /></a></div>
<ul class="namelist1">
<div align="left" class="linespace1" style="float:left;"><!------ ----------></div>
<li class="dob1"><div style="float:left; text-align:right; width:10px;"></div><a href="">Siva Sundharam</a></li>
<br />
<br />
<br />
<li class="dob"><div style="float:left; text-align:right; width:10px;"></div>(Pondicherry, India)</li>
<br />
<br />
<br />
<li class="dob"><div style="float:left; text-align:right; width:10px;"></div>
<a href="">Profile</a> | <a href="">Playlist</a> | <a href="">Friends</a> | <a href="">Quarks</a></li>
</ul>
</li>
<?php } ?>
</ul>
here the javascript
function color_in()
{
document.getElementById("color").style.backgroundColor = "#DDDBD7";
//document.getElementById("color").src = "loading.gif";
//document.getElementById("list").style.backgroundColor = "#DDDBD7";
}
function color_out()
{
document.getElementById("color").style.backgroundColor = "#FFFFFF";
//document.getElementById("list").style.backgroundColor = "#FFFFFF";
}
Now I need to pass the $i variable in js to make that every element of li shows the on mouseover property..