Solved

To handle ResourceBundle

Posted on 2004-09-02
3
171 Views
Last Modified: 2010-05-18
Hi

   I am using resource Bundle to get the messages of client Validation in my struts application. When i get the value through java and want to pass in the client Validation funcion for example

<html:text property="name" onclick= "javascript:fun("<%=MessResource.emptyLoginMessage%>">
then html:text doesn't support to handle or give these java values at run time

Now i  am using hidden html imput tag to handle the value and using its value to give alert.

I want to use something else because of lots of hidden input tags my code becomes tough.

IS THERE ANY WAY TO HANDLE RESOURCEBUNDLE IN JAVASCRIPT

IF YES THEN PLEASE TELL ME THE WAY OR ANY OTHER SOLUTION


THANX AND REGARDS

0
Comment
Question by:econcepts
3 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 100 total points
ID: 11963186
two things I see (but I don't know if this will fix your problem)

  onclick="javascript:fun("<%=MessResource.emptyLoginMessage%>">

1)  you don't need the javascript: modifier in event handlers (such as onclick)
2)  you have a missing quote and a missing )

onclick="fun('<%=MessResource.emptyLoginMessage%>');" > 

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question