in this below Java script drop down from Line.js, the onchange() is not called when i use mouse to select an option from drop down in mozilla environment. Even if I select an option the default one is reflecting. I was able to do the selections and it works well when I use key board up and down arrows followed by enter.
Where as in IE 8 it works well with mouse but not with keyboard.
Any quick solution will be highly appreciated. -
this.myActivityButtonGui = slider.document.createElement("select");
-
-
// this.myActivityButtonGui.options[this.myActivityButtonGui.options.length] = new Option("S", "C", false, false);
-
// this.myActivityButtonGui.options[this.myActivityButtonGui.options.length] = new Option("M", "M", false, false);
-
// this.myActivityButtonGui.options[this.myActivityButtonGui.options.length] = new Option("L", "R", false, false);
-
// this.myActivityButtonGui.options[this.myActivityButtonGui.options.length] = new Option("G", "G", false, false);
-
// this.myActivityButtonGui.options[this.myActivityButtonGui.options.length] = new Option("F", "F", false, false);
-
-
var opt1 = document.createElement("option");
-
var opt2 = document.createElement("option");
-
var opt3 = document.createElement("option");
-
var opt4 = document.createElement("option");
-
var opt5 = document.createElement("option");
-
-
-
opt1.value = "C";
-
opt1.text = "S";
-
opt1.id= "C";
-
-
opt2.value = "M";
-
opt2.text = "M";
-
opt2.id= "M";
-
-
opt3.value = "R";
-
opt3.text = "L";
-
opt3.id = "R";
-
-
opt4.value = "G";
-
opt4.text = "G";
-
opt4.id = "G";
-
-
opt5.value = "F";
-
opt5.text = "F";
-
opt5.id= "F";
-
-
if(browserType.indexOf("MSIE")!= -1){
-
this.myActivityButtonGui.add(opt1);
-
this.myActivityButtonGui.add(opt2);
-
this.myActivityButtonGui.add(opt3);
-
this.myActivityButtonGui.add(opt4);
-
this.myActivityButtonGui.add(opt5);
-
}else{
-
this.myActivityButtonGui.add(opt1,null);
-
this.myActivityButtonGui.add(opt2,null);
-
this.myActivityButtonGui.add(opt3,null);
-
this.myActivityButtonGui.add(opt4,null);
-
this.myActivityButtonGui.add(opt5,null);
-
-
}
-
-
this.myActivityButtonGui.onchange= function(){ // when i use //mouse with mozilla it is not coming into the loop that is onchange was //not fired.
-
slElement.value = this.options[this.selectedIndex].value;
-
}
-
1 1796
Do you have a test page demonstrating the problem?
PS. don't use browser sniffing, use a try/catch to add options.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Therese A. Sorna |
last post by:
Hello all...
I am using Access 2002, and am trying to find a way for a user to be
able to select multiple entries from a drop-down list. I am hoping
that given a list as such:
a
b
c
d
|
by: Sabra D via AccessMonster.com |
last post by:
I have a db with 3 tables, owner, lessee, and tract, tract is the main table
and has two lookup fields to find the owner and lessee info.
My problem - i have a form with the owner info on top and...
|
by: deepee |
last post by:
I have a drop down box in HTML using SELECT and OPTION tags:
<select title="Choose a number" onchange="obscure()" name="Digit1"
ID="Digit1">
<OPTION VALUE=""> </OPTION>
<OPTION...
|
by: Wayne Deleer |
last post by:
Here's a perplexing thought... right now I'm writing an application
that uses a web form, with many different input types. Some of these
types are lists that allow for multiple selections. After...
|
by: anniyan1981 |
last post by:
Need help very Urgent.
I need to know how to select all the values in the Drop Down list by clciking a button.
Please help me...
|
by: millertime90 |
last post by:
Hi basically my problem is I have 2 drop down menus populated by my database the first populated by a field in the database and the 2nd populated with a relation to the value selected in the first...
|
by: sparksol |
last post by:
I have a form with a drop down box. If you select an option in the drop down box (depending which option is selected) one or two textbox(es) and a submit button display.
I would like to keep the...
|
by: ikilldeath |
last post by:
Hi,
I am very much new to JavaScript. Please, can anyone help in resolving this issue.
Here in the example
http://www.javascriptkit.com/script/script2/flipmenu.shtml
There are two folders:...
|
by: vimal |
last post by:
hi all,
i am still a learner in javascript
i have a select tag with options as follows:
<select>
<option py:for="mb in range(32,100)">${mb}</option>
</select>
|
by: vidurac |
last post by:
dear all,
I want to dynamicaly write option values in drop down list using php. i use following code to do it.
var x = document.getElementById("x_AreaName").value;
x.options.text="text to...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |