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
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

can I do java script like the following

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi All:
Could someone take a look at the the following?


will javascript take place in effect?
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
out is an implicit object in scriptlets, so you can leave the first line out of your code.

Everything in the jsp will get turned to html before it ever reaches the client, so yes, it is valid and your resulting javascript should function normally.
 
author & internet detective
Posts: 39343
755
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
You need to add quotes around the parens to make it a string.

Since you are in a JSP, you don't need to use a scriptlet to output static things (like <script> tags.)
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
Round these parts, posting the same question in multiple forums is bad practice. It can make it rather difficult to follow a conversation, plus folks spend time saying things that were just said.

Please continue in the duplicate post in the HTML and JavaScript forum...
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!