Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java script error if the populated arrayList is empty in the page.  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Here is my problem.
I have two seperate tables in my jsp page populated by two different db calls.
If one of the list is empty im getting the following error. The page is loaded but on the window i see the java script error.

'undefined' is null or not an object.
This happenes on page load.
Can anyone help me how to solve it.
 
Author and ninkuma
Marshal
Posts: 66677
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the HTML being sent to the browser using View Source. Is it what you expect? Is it valid? What do you need to do in the JSP to make sure that it emits valid markup?

Please show some effort.
 
Priya Vedan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tired before posting this. It didnt work.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66677
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try harder.

And look at it yourself. Does it look right? Is it valid?
 
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not like *we* can look at it anyway; there's no code.
 
Priya Vedan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your time.

Its not like i dint try at all and just posted it off.
I finally figured it out and the problem is i am not getting any script errors if i use a different version of browser.
being a new bie i asked some help.
I didnt post the code as it a large piece and by the way the code is in Valid format.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All I'm saying is that it's *impossible* to help with absolutely nothing to go on.
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!