/* properties is an object that I carry through the functions that
does not
impact the problem. see below, and thanks */
function prepare_to_show_properties(properties)
{
if(!document.getElementsByTagName) return false;
if(!document.getElementById) return false;
links=document.getElementsByTagName("a");
row_at='odd';
for(d=0;d<links.length;d++)
{
if(links[d].getAttribute('prop'))
{
links[d].onclick=function()
{
show_prop(this,properties);
return false;
}
links[d].onmouseover=function()
{
show_thumb(this);
}
link_parent=links[d].parentNode;
cell_parent=link_parent.parentNode;
if(row_at=='odd')
{
cell_parent.onmouseout=function()
{this.className="js_row_odd";}
row_at='';
}
else
{
cell_parent.onmouseout=function()
{this.className="js_row_even";}
row_at='odd';
}
cell_parent.onmouseover=function(){this.className= "js_mouseover";}
}
}
}
Thanks for the response:
show_prop(this,properties); > appears to be the offending line
for Firefox. "This" is the actual 'a' element and any of its
attributes which have been defined earlier:
a.setAttribute('prop', prop);
With IE, the function show_prop ushers in both objects just fine.
When I then use "alert(prop.prop)", or "alert(this.prop)", Windows and
Netscape both announce the correct property number no matter what line
I click on. Firefox does not. It announces the last property number
in the list no matter what link I click on. With IE I am able to stay
completely client. I have not been able to do so with Firefox.
Again, I have tried everything imaginable to try and get Firefox to
load a function as indicated. This is frustrating. By the way, the
show_thumb function above is also impacted by this
problem in Firefox as you might imagine.
One note, I rebuilt my page specifically in Firefox, making sure of
"well-formedness", etc. not thinking that this would help, but I
really like the resulting layout, and I end up with the same issue.
Scott
On Feb 15, 6:17 am, Martin Honnen <mahotr...@yahoo.dewrote:
Quote:
scotty wrote:
Quote:
I have a script that loops through an existing table list and prepares
each href element node to trigger a function when an image is
clicked. The function that will be run passes a property value to the
function upon clicking. The property value is one of the attributes
defined for each respective href in the property list.
>
Quote:
In IE and Netscape, the property values pass correctly, but in
Firefox, only the last property value in the list of properties is
passed to the function. Even if you click on an image at the top of
the list, still only the property number associated with the last list
item is passed.
>
Show us the relevant JavaScript code and HTML. You might be using a
closure although it is not clear to me why you get different results
between IE and Firefox and particular between Netscape and Firefox.
>
--
>
Martin Honnen
http://JavaScript.FAQTs.com/