469,289 Members | 2,215 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

onchange event in IEMobile

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
May 31 '08 #1
1 1337
On May 31, 1:18*pm, Daan <daanst...@gmail.comwrote:
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
May 31 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Asit | last post: by
4 posts views Thread by Zeebra3 | last post: by
3 posts views Thread by b_naick | last post: by
1 post views Thread by Daan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.