Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prototype tableID in function

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know, it s not really a Java-Issue..

I use Prototype in my JSP-Site.

To have a zebra-style in my table, when the onmouseover Event (=onmouseoveL=onmouseover) occurs.
This Code works:



However, the code above styles ALL tr-Elements of my Site.
I want to style only the tr-elements of myDataTable.

So I tried this, but it does not work:
(mySite:myDataTable is the client-ID of my DataTable).



I tried this also, but it does not work:




What am I doing wrong?
[ November 23, 2008: Message edited by: nimo frey ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to foolow the same ideas that CSS does when you want to speficy things in your stylesheet rules.

So we need to follow the pattern:


Eric
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey eric,

thanks that works. But now, I have a strange behaviour:

When I do this, all works fine (only my datatable is styled):


But I need a form around my dataTable:


But when I wrap a form around my datatable and the mouseover-Event occurs,
then instead of my dataTable the form is styled! very strange.

When I delete my form-tags, then zebra-style for my dataTable works. But I need the form around my datatable.

Any suggestions?

[ November 23, 2008: Message edited by: nimo frey ]
[ November 23, 2008: Message edited by: Eric Pascarello ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at the generated html page and see what is different between the 2 pages?

Eric
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I wrap my dataTable with a div instead with a form, then the generated
html looks like:

This works, as I have a wrapper div:



This works not, as I have a wrapper form:


You see, when mouseover occurs, then the class myStyle is adapted in the form-tag instead of the tr-tags..strange.

Why is that so?
[ November 23, 2008: Message edited by: nimo frey ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic