Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb 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:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old March 28th, 2005, 03:22 PM
aktra aktra is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 1 aktra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 48 sec
Reputation Power: 0
Question Replacing the combo box with <div>

Have a web site and need to get the start page working as follows:
General
I have one background image + 3 images on my page( each image is of a country)
I have 3 combo boxes (each related to a city of a country) that gets populated from a database.
Todays working:
When the user scrolls over a country image and then clicks the combo box below it, all the records are displayed.
Required working:
When the user scrolls over a country image the combo box should automatically display its records.
End result:
I do not want the user to click the combo box to display the records instead I want the records to display automatically when the user scrolls over the country.
I have heard that one cannot get the combo box to use the OnMouseOver. It seems that using the <div> instead of the combo box could solve this issue.
Any suggestions on how this can be done, and if there is any code available that can perform this function.

Reply With Quote
  #2  
Old March 31st, 2005, 05:12 PM
devqual devqual is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Porto, Portugal
Posts: 33 devqual User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 19 m 41 sec
Reputation Power: 5
I've done similar things with javascript.

Anyway you define the html inside a <span> with a fixed id.

try something like this:

Code:
//Create a function like this for each country
<script language="javascript">
function contry1(record){
document.getElementById('display1').innerHTML=reco  rd
}
</script>

//In the image you call the function

onmouseover=country1('record_to_be_displayed');

//insted of a combo you can have this
<span name="display1" id="display1">default_record</span>



if there is no mistake...This simple script automatically chages the text inside the <span>

I'm very far for being a moderator but I would suggest to transfer this thread to Javascript development...I might help more that here.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > Replacing the combo box with <div>


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 1 hosted by Hostway