Solved

To handle ResourceBundle

Posted on 2004-09-02
3
168 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now