onchange event in IEMobile

D

Daan

I want to make a single web page with a select element and a div
element. The text in the div needs to be changed, when a different
value is selected in the select element. This does not have to be
dynamic (AJAX). Using the following sample code, this works just fine
in desktop browsers, but it does not work in my version of IEMobile,
which is the targeted platform in this case. Do you know how I can
make this work?

selectField.onchange = function() {
contentDiv.innerHTML = "Changed text.";
};

Thanks for any help,
Daan
 
D

Daan

I want to make a single web page with a select element and a div
element. The text in the div needs to be changed, when a different
value is selected in the select element. This does not have to be
dynamic (AJAX). Using the following sample code, this works just fine
in desktop browsers, but it does not work in my version of IEMobile,
which is the targeted platform in this case. Do you know how I can
make this work?

selectField.onchange = function() {
        contentDiv.innerHTML = "Changed text.";

};

Thanks for any help,
Daan

I have found some workaround: it seems that this unobtrusive method of
adding the event handler does not work, but when the code (or function
call) is directly added to the element like so,

<select onchange="callFunction();">

it does work.

Daan
 

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
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top