• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javascript and servlet

 
hamid Hassannejad
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I’m new in servlet programming. My project is on a Tomcat server.

I started to use some widgets. I chose . I needed a grid so I startet with the grid widget. there was an html example which was pretty close to what I am going to implement. I created a jsp file and I put the exact content of the html sample into jsp file.

when I access directly to the jsp file everything works (http://localhost:8080/TestProject/datagridtest.jsp), but, when I access the same jsp file via a servlet (which returns the same file with no change – http://localhost:8080/TestProject/testservlet?Action=gridtest) , the result is not alright. I mean, all the widgets are there, the scripts are run (for example the data has filled in the grid by the scripts), but the events which are bound to the widgets do not work. Events like “change” or “rowselect” which are implemented in the page, do not work.

I hope here is a right place to bring this issue in. I thought some body might have a same problem. any comment will be apppreciated.

thanks
 
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
Have you checked the HTML that is sent to the browser in the case that doesn't work against the case that does? If not, that's what's next. If so, what are the differences?
 
hamid Hassannejad
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for the reply!

yes I checked. they are completely same. I don't understand it. if the HTML codes in the browser are same, why I get 2 different behavior? for the record, I'm working in ubuntu and I checked it with firefox and chrome.
 
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
If the HTML is exactly the same, I would expect them to act identically. Have you used the debugger in chrome to watch for JavaScript errors? To make sure that all of the resources are loading?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic