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
Solved

struts2 tooltip

Posted on 2014-04-07
4
1,237 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
The viewer will learn how to implement Singleton Design Pattern in Java.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

860 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