inulled;10983161 wrote:
this problem
Which problem?
html or php tags rather than code tags, depending on wether you deem it best to highlight as php or html. Also, indent your code properly
if($row = mysql_fetch_array($artist_query))
{
?>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
.attr("src", "<?php echo $row['Artist_IMG']; ?>");
</script>
<span id="hometown" class="auto-style8"> Hometown: <?php echo $row['Hometown']; ?></span></span></td>
<?php
}
?>
inulled;10983161 wrote:
I'm assuming the while loop
There is no while loop
inulled;10983161 wrote:
doesn't effect the content in the JavaScript statement.
Your php code doesn't just affect the javascript contents, it creates it (or not, should the php if statement evaluate to false).
inulled;10983161 wrote:
Does anybody know of a quick fix
Once again, to what?
inulled;10983161 wrote:
and/or know what I'm doing wrong?
.whatever(), in your case .attr(), does look awefully suspicious. I've only ever looked at jQuery to answer questions here, but perhaps you want $.attr()?
Also, since the DOM is not yet ready, I wonder if you're allowed to do that at all...
But anyway, why not just create the image elements (if it is indeed image elements you want) without javascripts since the src attribute value is known when the page is generated?