|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Development > Replacing the combo box with <div> |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|