Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
paul wheaton
Ron McLeod
Devaka Cooray
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Paul Clapham
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
JSP
Calling JavaScript using EL
Ed Carrington
Ranch Hand
Posts: 77
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am trying to call a JavaScript function using EL.
My below attempt outputs the following exeption:
The function dateInfo must be used with a prefix when a default namespace is not specified
Please advise.
<%@ page contentType="text/html; charset=utf-8" language="java"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Date Info</title> </head> <body> <script> function dateInfo() { return new Date(); } </script> <fmt:message key='content.dateInfo()' /> <c:out value="${dateInfo()}"/> </body> </html>
David Newton
Author
Posts: 12617
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
EL runs on the server; JS runs on the client. It's not going to work.
Bear Bibeault
Sheriff
Posts: 67754
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Read
this article
to find out how
JSP
works.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Getting javascript error while closing ActiveXRecordset object
XML DOM is not working
JSF binding conversion
Having Problems with Jquery.
Cannot see the JavaScript code I wrote when I hit script tab on firebug :(
More...