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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hover Pop Up Box With Database Information

Status
Not open for further replies.

djcampos

Programmer
May 12, 2005
15
US
I would like to use Javascript to create a hover box that will pop up when I move over text. In addition to that, I want this hover box to contain information from a field in a database associated with the text that I am mousing over. Does anyone know of a tutorial that will show me how to do this?
 
Is the data going to change as you hover over different items on the page?
Is the data going to be unusually long or just a short description of the item you are hovering over?
What server-side language will you be using to retrieve data from the database?

It sounds like all you need is a tooltip script. You will probably be best off loading all of the text you need for each item that it will display for and inserting that value into the javascript function call for that tag's onmouseover event as the page loads.
You could use Ajax to dynamically run out to the database and grab that one field every time you do a hover but that would be very klunky and probalby not necessary.


It's hard to think outside the box when I'm trapped in a cubicle.
 
I'm creating a help desk. When a technician mouses over the title of the work order, I would like the hover pop up to contain the description of the work order that is contained in a SQL Server database. I am using ASP to write my pages. I just plan on having one rollover on the page. I'm basically trying to save the user a click by showing them the description of the work order without having to view an additional page. The descriptions shouldn't be too long.
 
When your page loads you are already reading the DB in order to get info like the work order number so grab the description at the same time and store it as a value on the page.
As you write out the HTML for the page you can just insert the ASP variable for the description into the onmouseover event for that title.



It's hard to think outside the box when I'm trapped in a cubicle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top