Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Access JavaScript data in Java

Thread view: 
moop™ - 28 Oct 2005 08:19 GMT
Hi,
As known, we can use <%= and %> or  <% and %> to cite Java code in
JavaScript, is it able to access JavaScript data in Java code?

Thanks!
Roedy Green - 28 Oct 2005 08:40 GMT
>As known, we can use <%= and %> or  <% and %> to cite Java code in
>JavaScript, is it able to access JavaScript data in Java code?
are you confusing JSP with Java?

See http://mindprod.com/jgloss/java.html
http://mindprod.com/jgloss/javascript.html
http://mindprod.com/jgloss/jsp.html

You don't embed JavaScript in Java or vice versa.  You sometimes embed
JavaScript in HTML which you generate with Java or JSP.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

HalcyonWild - 31 Oct 2005 13:44 GMT
> Hi,
> As known, we can use <%= and %> or  <% and %> to cite Java code in
> JavaScript, is it able to access JavaScript data in Java code?
>
> Thanks!

There is no direct way to access the JavaScript code in JSP. It is JSP
which is generating your JavaScript. At most, you can try to get around
this limitation by using hidden parameters, and refreshing the page on
onBlur. It seems like a dirty fix, since it needs a trip to the server
to populate request parameters from javascript.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.