471,895 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,895 software developers and data experts.

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 1376
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
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.