• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I place this JavaScript page out of JSP page?

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

this is My JSP page


as you can see I am processing my object that is send by servlet to JSP page in JSP I want to put this JavaScript function outside this JSP page
Is there any way so that I can place this JavaScript function outside this JSP page?

I am using JQuery also
 
Tapas Chand
Ranch Hand
Posts: 602
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I understand, there is no need of javascript for this.
If you are displaying the details of students in the JSP, you can do this without javascript. EL is enough to do this.
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Tapas Chand
Can you give me an example without javascript how can you find Id of an element and set text on it?
 
Tapas Chand
Ranch Hand
Posts: 602
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will give a small example which can be reffered.
Say I am getting a List<Student> in JSP, where Student class have rollNo and name fields.
Then in JSP I can write to display the records of all students.
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So if I need some customized CSS like font,color,size changed on HTML how will you do?

And there is more than one block that need to be dynamically generate and attach to some block(Like prepend and append)
 
Tapas Chand
Ranch Hand
Posts: 602
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I did not get the requirements.
What do you mean by customized CSS?
What do you mean by dynamically generate and attach some block?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!