0

Hello!
I have a table with cells, and each cell contains the following code:

<td align='center' bgcolor='#C45651' width='80' height='60' nowrap='yes' id='$' onClick='callPicture(this);'><p dir='ltr'><img border='0' src='X.jpg' width='80' height='60'></td>

The javascript function

function callPicture(ID){

gets the cell's ID and uses it.
(This table is being written cell be cell dynamically via ASP, and each cell gets a number as an ID instead of the '$'.)

This code works great in Internet Explorer (I'm using 8), but in firefox it simply won't work. and it doesn't say JavaScript error, it just does nothing.

Can someone help me with this onclick thing? :icon_question:
Or maybe an alternative that can still pass the cell's ID to the function?

THANKS

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by @developer
0

The code seems to be getting the id of the object in both firefox and IE.Try alerting it.Check what you are getting.

<script>
	function callPicture(ID)
	{
		alert(ID.id);
	}
</script>
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.