This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 1055





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: 60810
    
  65

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: 1055

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: 60810
    
  65

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: 1055



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: 1055

Issue resolved </table> was in while loop itself hence the issue :P
 
 
subject: jquery script not executing on the data values that are extracted from the database
 
Similar Threads
Display result is reverted back (JSP and JQuery)
calling the struts action on jquery button click
struts-2 (set values to action class)
spaces while populating using s:iterator
jQuery doubt with reference to Object Literal Example.