• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Selector Wildcard Looping

 
Steve Dyke
Ranch Hand
Posts: 1621
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I verify what the following loop is picking up be cause it should loop 2 times and is loop ing four anf the last two shows undefined.




My jsp, jstl code:



Sorry, nevermind, I figured it out.

It still amazes me that still after all our technial break throughs that computers are still so dumb.

As has been said, A computer will always do what you tell it but seldom do what you want.

I had the same attribute name on two different pages, go figure.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the future, an easy easy way to test what a jQuery selector will select is to simply open the JavaScript console and type in the jQuery statement.

(Also in the future, please refrain from posting JSP code in the HTML forum. JavaScript doesn't see the JSP, it sees the generated HTML.)
 
Steve Dyke
Ranch Hand
Posts: 1621
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:For the future, an easy easy way to test what a jQuery selector will select is to simply open the JavaScript console and type in the jQuery statement.

(Also in the future, please refrain from posting JSP code in the HTML forum. JavaScript doesn't see the JSP, it sees the generated HTML.)


Thanks Bear.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My pleasure.

If you (and the "you" here is directed at anyone reading this post that writes any JavaScript, HTML or CSS) aren't familiar with the WebKit debugger as implemented in Chrome and Safari, you owe it to yourself to get familiar with it.

Typing jQuery statements into the JavaScript console is just the slightest tip of the iceberg. Nothing beats being able to set a breakpoint in script that isn't behaving as expected and actually looking around and making changes on the fly.

Another example: having CSS issues? Use the debugger to modify the CSS on the displayed page. See what's going to work before you have to go back to the code and update it.

The list of capabilities goes on.

Firebug for Firefox is cool too -- but I don't find it as feature-rich.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic