SunQuest
 
           MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 12th, 2004, 10:05 PM
wmmfan wmmfan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 wmmfan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Highlighing items generated from mySQL

Hello all!

I have a php/msql database and I am pulling items from it based on which category a user has chosen. I then have pictures of some of the items in that category.

Here's my question: How do I set it up so that when a user clicks on a picture, the corresponding text (which has been displayed using a mysql_fetch_object() loop) is highlighted on the page somehow. It can be highlighted or pointed to with an arrow, or whatever.

I've tried using layers. Generating a new layer named after each item name was easy. Assigning text to that layer when the image was clicked was also easy. Getting rid of that text when another image was clicked.... brick wall (can be done but with TONS of HTML).

I'm looking for a time-saver. Any help would be great.
Thanks for listening!

Reply With Quote
  #2  
Old April 12th, 2004, 11:46 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Are you creating a list of items? If so, you should be using the UL/LI to markup it up semantically. Using CSS, you can do a whole bunch of nifty stuff to present your list. E.g
Code:
<!-- the HTML -->
<ul>
  <li><a href="#">Item 1 - Blah</a></li>
  <li class="altRowColor"><a href="#">Item 2 - Foo</a></li>
  <li><a href="#">Item 3 - Bar</a></li>
  <li class="altRowColor"><a href="#">Item 4 - Honky Tonk</a></li>
<ul>

<!-- the CSS -->
ul {
  list-style-type : none;
  margin : 0;
  padding : 0;
}

li {
  background-color : lightsteelblue;
}

li.altRowColor {
  background-color : blue;
}

li a {
  display : block;
  padding : 2px;
}

li a:hover {
  background-color : red;
}
The above example will create a list of items, and change the background color of the item the mouse is hovering over to red.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Highlighing items generated from mySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway