How to change one element to another, follow up question

L

Lorenzo Thurman

The suggestion I received earlier works just fine, but what if I have
two text fields that need to change into selects when they receive a
mouseover? I'm creating the text fields in a loop that looks something
like this in pseudo code:

for($i=0; i<2; i++){
<div onmouseover="dosomething()"><span>text for mouseover</span>
<select name="myselect" onchange="dosomething()" styke="display: none;">
<option>
<option
</select>
</div>
}

Of course, I don't want the elements the same name or id's. They need to
behave independently of each other. The actual text for the span is
retrieved from a database and is spewed out from a
while($data=$databaseConnection->fetchObject() loop. I hope this is
clear. Sorry I did not not include this in my original post. I thought
my problem was simpler than it actually is.

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top