473,493 Members | 4,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1427
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
20672
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
1742
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
12112
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
31165
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
4067
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
3958
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
3888
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
249
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
7118
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
7157
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
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3087
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.