Solved

To handle ResourceBundle

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…
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…

762 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

19 Experts available now in Live!

Get 1:1 Help Now