Solved

struts2 tooltip

Posted on 2014-04-07
4
1,286 Views
Last Modified: 2014-04-08
im trying to display the struts2 tooltip icon in my jsp page. i have added the javascriptTooltip in form and tooltip in the textfield. Im not sure what im doing wrong here.

the code is as below.

<s:form id="user" theme="simple" action="modifyUserAction" cssClass="myform"  javascriptTooltip="true">

<li><label><span class="red">*</span> First Name:</label> <s:textfield id="firstName" name="firstName" maxlength="32" cssClass="text" theme="simple" tooltip="Enter firstname"/></li>

</s:form>

<script>
$(document).ready(function() {
      $('#firstName').tooltip();
});
</script>
0
Comment
Question by:Newton21205
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 500 total points
ID: 39985443
the attribute should be title not tooltip..

<s:textfield id="firstName" name="firstName" maxlength="32" cssClass="text" theme="simple" title="Enter firstname"/></li>
0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 39985445
i assume you have included these two js in your jsp.

    <script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
0
 

Author Comment

by:Newton21205
ID: 39986389
yes  i have the two queries. Also title did not work.
0
 

Author Comment

by:Newton21205
ID: 39986401
thank you i was able to show the tooltip using title. This is what i did.
Now im trying to post this key to action class to retrieve value from the database.

Please can you show me how to use onclick event with jquery to send this through ajax.

<li><label><span class="red">*</span> Firstname: <i class="icon-info-sign" title="<s:property value="%{description}"/>" id="firstName"></i></label> <s:textfield id="firstName" name="firstName" maxlength="32" cssClass="text" theme="simple"/></li>
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

705 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