Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:52:00+00:00 2026-06-10T09:52:00+00:00

I need to reference a Java varaible within an HTML tag in order to

  • 0

I need to reference a Java varaible within an HTML tag in order to display the string variable contents as the HTML “title” tag value for a tool tip. I have been trying for a day and a half now and my google searches have not yielded any help yet either.

I am storing the Java variables in a table per the requirements of this app, and the below code is the closest I can get to correct but it shows the exact text ‘block_type_desc’ for the tool tip/on mouse over result that I need to show the value within the table column ‘block_type_desc’ when you move your mouse over the “block_code” value. I have tried :
sb.append(“”+block_type_desc’);
sb.append(“”);
sb.append(“”);
sb.append(“”); //this one no matter how I differentiate the syntax round t.getValue etc. it won’t compile

Can someone please advise how to correct my syntax to call the variable string data corectly to display it? thank you so much in advance for your time and help!! I am copying the whole display function as I think that will help paint a complete picture of my needs and situation.

private StringBuffer displayUserMenuItems(Table t) {
        StringBuffer sb = new StringBuffer(20000);
        sb.append("<table>");
        sb.append("<tr>");
    sb.append("<td><strong>Code</strong></td>");
    sb.append("<td><strong>Menu Item Description</strong></td>");
    sb.append("<td><strong>Block Type</strong></td>");
    sb.append("</tr>");
    t.reset();
    String css;
    int i = 0;
    while (t.next()) {
        if (i % 2 == 0) {
            css = "even";
        } else {
            css = "odd";
        }
        sb.append("<tr class=\"" + css + "\">");
        sb.append("<td>");
        sb.append(t.getValue("menu_code"));
        sb.append("</td>");
        sb.append("<td>");
        sb.append(t.getValue("menu_desc"));
        sb.append("</td>");
        // this next line below displays "block_type_desc" for title
        **sb.append("<td title='block_type_desc'>");**
        sb.append(t.getValue("block_type"));
        sb.append("</td>");
        sb.append("</tr>");
        i ++;
    }
    sb.append("</table>");
    return sb;      
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:52:02+00:00Added an answer on June 10, 2026 at 9:52 am
    sb.append("<td title=\"" + t.getValue("block_type_desc") + "\">");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What do I need to do in order to reference the double click event
How can I pass an array by reference in Java? For instance I need
What's the best alternative to to java.text.Normalizer in android versions previous than 2.3? http://developer.android.com/reference/java/text/Normalizer.html
Possible Duplicate: Is Java pass by reference? I need to modify the content of
I need a reference counter for an object not allocated on the heap. I
Say I have some 10 categories that I need to reference in a web
I am building a common function library but the functions inside need to reference
I'm building a Windows Phone 7 app, and I need a reference to my
Somebody ask me this question today . What is the need of reference in
I am writing a resume script and I need the heading Reference to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.