• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

jQuery not working on page

 
Ranch Hand
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
line 200 : $("*").css("border","3px solid red");
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that works fine, this mammoth has something wrong in it
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic