Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB text display

Status
Not open for further replies.

zeero

Programmer
Aug 4, 2004
60
US
Hi all, I'm having problems trying to explain this, but I have a page with text driven from a DB. I'm using stylesheets to create a box around the text to make it look like a button. You have to click the "button" to bring the description up on the other side of the screen. I think the resultset is giving me problems with my javascript displaying the description automatically as you scrollover the buttons. Here's what I have.

Code:
This is all on one page.

|---------|     |------------------|
| Item 1  | --> | Item 1 Descript  |
|---------|     |------------------|

|---------|     |------------------|
| Item 2  | --> | Item 2 Descript  |
|---------|     |------------------|

|---------|     |------------------|
| Item 3  | --> | Item 3 Descript  |
|---------|     |------------------|

What I want to have it do is as you scroll over each button on the left, the description for it displays as well on the fly. The description text is all pulled from the DB too. I apologize if this is more of a javascript problem, I'm just not sure why you have to click the Item to display the description. I was wondering if this is because of the resultset? Would java.awt handle this? Thanks.
 
because the text on the button is driven from the db as well as the description blurb on the other side of the page. (which I'm assuming would be something like:)

Code:
String item = result1.getString("item");
...
<input type="button" title="<%= item %>" value="my button"/>

but I dont want to use the standard html grey buttons
 
Well, you don't have to if you use CSS !

Code:
<html>
<head>
   <style type="text/css">
	.inputButton
	{
		font-family: Verdana, Arial, Tahoma;
		font-size: 10px;
		font-weight: plain;
		border-style: solid;
		border-width: 2px;
		border-color: #000000;
		color: black;
		background-color:#ccaabb;
		cursor:hand;
	}
</style>
</head>

<body bgcolor="#FFFFFF">

<input class="inputButton" type="button" title="my tool tip" value="my button"/>

Click here to learn Ways to help with Tsunami Relief
--------------------------------------------------
Free Database Connection Pooling Software
 
I mean
Code:
<input type="button" title="my tool tip" value="<%= item %>"/>
 
You replied as I was typing my correction, my first reply I had title=<%...%> what i meant was value=<%...>. It was uncalled for since what you showed me is what I needed. Thank you for your help, sorry for the confusion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top