File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery not working on page

 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a code which generates HTML.
I am trying to use jQuery in this but it is not working.



the HTML generated follows :





I get JS error inside
document.ready
when I try to call a selector
I am really new to jQuery and can't find what the issue might be. Please look into the html and see if a help is possible.
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

What is the error message that you are getting?
Also what are you expecting to happen? You don't have any html elements that have a class called text.

Sean
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sean,

I get the message "Null" is null or not an object. at line 200.

What I want : I want to call a date-picker component on all text fields inside < td class = "datepicker" >

i.e.

I have all the IDs of text fields if required.

I tried



to test if selectors are qorking , but they didn't.
then to test it at unit level .. i tried to change CSS of all text fields.

From your comments I understand, $("text") is the wrong way to call text fields.

I now tried $("*").. still does not work.
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I'm not really sure what is causing you to have this issue, your jQuery stuff seems ok, but I really can't get my head around all the markup etc in your posted code. Perhaps someone else will be able to help more.

So what code is it stopping at? i.e. what is on line 200?

Sean
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
line 200 : $("*").css("border","3px solid red");
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this, create a new page with just a few lines of code. This monster is a waste for us to go through ince 99.9% of it does not apply.

Just make a simple page with jquery and your ready function.

Eric
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that works fine, this mammoth has something wrong in it
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is when you break out your debugging hat. Comment everything that is not related to the problem and see if it works. If it does uncomment a little bit more and see if it works. Do it until it breaks. Than you know where the problem is at.

Eric
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you kidding me? 2000 lines of HTML? Where some of the lines are like this:Format your code in a meaningful way so we can actually read it without scrolling three screens to the right. Indent it. Remove what isn't relevant.

Look in to CSS--it's really quite handy; I hear people are using it now.

 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric, dacid,
I agree totally with you. This is an autogenerated code.
I'll format it and paste.

I agree..I can also try with a smaller screen generated at once.
This screen is large.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic