473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1418
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
2
by: F. Da Costa | last post by:
Hi, I'm trying to call/ mimic an onchange function/ event after a user has clicked a checkbox. In response to which a buncch of other ones need to be checked as well. The caveat is that each of...
2
by: Asit | last post by:
In JavaScripts checks for an onChange event against the value of the textbox at the time of the last onChange event. Since an onChange Event never fired after you changed the text first time ,...
13
by: aundro | last post by:
Hello, I've been looking on the web for a solution to this problem: I create a set of checkboxes, and 2 buttons: - one is labeled "All" - the other is labeled "None" Clicking "All" is...
4
by: Zeebra3 | last post by:
Here goes: I have a web form with several asp:dropdownlists, with which, when selection is changed I want to fire an event defined in some clientside js. The content of the clientside code is...
3
by: jab3 | last post by:
Hello. I"m new to this group, and to JavaScript in general, so please forgive me if I breach local etiquette. I'm trying to implement some client-side 'dynamic' validation on a form. I'm having...
3
by: b_naick | last post by:
I realize that the onChange event for a drop down can be trapped as follows: <select name="myDropDown" onChange="somefunc"> Is it possible to trap the onChange event outside of the select...
1
by: Daan | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.