This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

jQuery in JSP page  RSS feed

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
     Greetings to all

     Have a problem with using of jquery in jsp-page

Code in JSP
     

    in Pom


and



  I suppose, the problem is in plugin.
  But I cant understand, in what it consists.


 
Rancher
Posts: 3989
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is the problem?
 
Andrey Dmitriev
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
   jquery-code does not work.

   I see only button - but it does not work
 
Saloon Keeper
Posts: 5343
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Separate the script tag that loads jQuery from the script tag with the JavaScript code. See the description of the src attribute in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
 
Andrey Dmitriev
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:Separate the script tag that loads jQuery from the script tag with the JavaScript code. See the description of the src attribute in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script



  I did this, but result is the same
 
Marshal
Posts: 67255
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Andrey Dmitriev wrote:I did this, but result is the same


Regardless, this was a necessary step. You cannot mix a script element with both a src attribute and a body.

So now that we are past that, open the Dev Tools and set breakpoints in the code to see where it is not doing what you expect. Let us know what you find.
 
Andrey Dmitriev
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  In console:  The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
for:   /jsfiles/jquery-1.4.2.min.js

  and:

  can't find variable $
 
Bear Bibeault
Marshal
Posts: 67255
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Andrey Dmitriev wrote:   In console:  The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
for:   /jsfiles/jquery-1.4.2.min.js


That does not match your code, where you use:
to load jQuery 2.2.4.

Are you also trying to load jQuery somewhere else?
 
Andrey Dmitriev
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
    yes, i m sorry. I have changed code on:






    And I  use other plugin



 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!