aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes jquery script not executing on the data values that are extracted from the database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jquery script not executing on the data values that are extracted from the database" Watch "jquery script not executing on the data values that are extracted from the database" New topic
Author

jquery script not executing on the data values that are extracted from the database

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056





script.js code



Odd tables are not coloured in this scenario


There are 3 entities created in a table and all the 3 entities are displayed in web application too.But all the three entities are shown in a different line also I have used hide script using the id attribute of the table then also only one row is hiding ,rest of the rows are visible



http://www.lifesbizzare.blogspot.com || OCJP:81%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

Showing JSP source here is not helpful. This is not the JSP forum and the JSP source is not what the browser sees. The browser sees the response generated from the JSP.

And you're still putting Java code in JSPs? In 2012?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056

Bear Bibeault wrote:Showing JSP source here is not helpful. This is not the JSP forum and the JSP source is not what the browser sees. The browser sees the response generated from the JSP.

And you're still putting Java code in JSPs? In 2012?


Hi Bear,

I am a Novice in JSP so doing it the old way... just for practise once i understand JSTL Tags I will definetly try it out, but the issue right now is the .js code that i defined that odd row tables should be this color is not working(as its a dynamic tables created when values are received from database tables)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

Vishal Hegde wrote:I am a Novice in JSP so doing it the old way... just for practice once

This is foolish. If you are a novice to JSP it's even more important to learn to do things the right way and not learn bad habits at the outset that you'll just need to unlearn later.

but the issue right now is the .js code that i defined that odd row tables should be this color is not working

What have you done to debug this? You've posted too much code for me to wade through. Are you sure that the elements exist before you are trying to reference them?

It'd be best to post an SSCCE that shows the problem.
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056



The above code snippet is working fine

And below is the other code js script:
$('#celebs tr: odd').
css('background-color', '#dddddd');
$('#celebs tr: odd').
css('color', '#666666')
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056

Issue resolved </table> was in while loop itself hence the issue :P
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jquery script not executing on the data values that are extracted from the database