Win a copy of Svelte and Sapper in Action this week in the JavaScript 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

jQuery in JSP page

 
Ranch Hand
Posts: 123
  • 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.


 
Master Rancher
Posts: 4665
49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is the problem?
 
Andrey Dmitriev
Ranch Hand
Posts: 123
  • 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: 6592
161
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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: 123
  • 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: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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: 123
  • 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: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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: 123
  • 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



 
See where your hand is? Not there. It's next to this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic