Solved

struts2 tooltip

Posted on 2014-04-07
4
1,177 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
Comment Utility
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
Comment Utility
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
Comment Utility
yes  i have the two queries. Also title did not work.
0
 

Author Comment

by:Newton21205
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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 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.

743 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

8 Experts available now in Live!

Get 1:1 Help Now