This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes write javascript function in java ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "write javascript function in java ?" Watch "write javascript function in java ?" New topic
Author

write javascript function in java ?

Ray Law
Greenhorn

Joined: Mar 30, 2005
Posts: 14
Now I convert a php program to java source, and find part of php source using javascript. Who know how to declare/write javascript function in java source, please let me know ? thanks.
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
are u talking abt java or jsp???


Life called,so here I am.<br />Cheers<br />Niki.:-)
Ray Law
Greenhorn

Joined: Mar 30, 2005
Posts: 14
Sorry, I mean JSP
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The same way you would write your html.
As text, outside of any scriptlets.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
there are following ways to write javascript in jsp



or




hope that helps.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: write javascript function in java ?
 
Similar Threads
input/output stream
how to call jsp method from html button form.
javascript vs. php
How to resize brower when Applet is resized?
How to resize brower when Applet is resized?