Solved

To handle ResourceBundle

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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 …
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…

770 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