Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

struts2 tooltip

Posted on 2014-04-07
4
Medium Priority
?
1,370 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This video teaches users how to migrate an existing Wordpress website to a new domain.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

618 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