473,385 Members | 1,867 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,385 software developers and data experts.

select onchange, doesn't fire in Firefox

The following works in IE9 but not in Firefox. What can I do to make it work in firefox.

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function upperCase()
  5. {
  6. var x=document.getElementById("fname");
  7. alert(x.value);
  8. }
  9. </script>
  10. </head>
  11. <body>
  12.  
  13. Enter your name: 
  14. <select size="1" id="fname" onchange="upperCase()">
  15.           <option value="1">1 år</option>
  16.           <option value="6">6 år</option>
  17.           <option value="10">10 år</option>
  18. </select>
  19.  
  20. </body>
  21. </html>
Mar 26 '12 #1
2 2015
Dormilich
8,658 Expert Mod 8TB
from what I can see there is no reason why it should not work in FF.
Mar 26 '12 #2
Works fine on my system, are you sure that JavaScript is enabled in FF?
Apr 3 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: David McNerney | last post by:
Would anyone be able to tell me why I get an error in FireFox 1.5.0.1 for MacOSX when I type some text and hit Enter in the following form: <html> <body> <form action="http://example.com"...
2
by: donald | last post by:
I have a function called populate which populate a select box. I need it to run when a different select box value is chnage. So I need the event onChange. But i need to pass it two var to. how...
1
by: Jan Doggen | last post by:
Hello all, I have a SELECT like this (the 'alert()s are temporary): <FORM method="POST" action="/scripts/runisa.dll?OVB2.132964:PGSPLITVACAFMELDEN:1095144287.9159" id="hulpform"...
2
by: onerobe | last post by:
Hi everyone. I have this bizarre problem and i am hoping someone can point me in the right direction. I have a group of form selects, and when one is changed it dynamically changes the content...
2
by: musclehead | last post by:
I have a fairly basic Javascript that is taking a selected value in a select and making a div on the page visible when selected, hiding it when unselected. It works great in IE, but Firefox is not...
1
by: daokfella | last post by:
I need to raise the onchange event and Firefox is giving me some grief. I hear fireEvent is buggy with some events. Is that true? My code is simply this: targetTextbox.fireEvent("onChange"); ...
1
by: Daniel | last post by:
Hello, Could someone show me the code required to pass the index of the selected option of a select control to an input textbox. For some reason I just can't seem to get it to work. Thank...
4
by: gamesforums | last post by:
Hi! I have some code within the Application_Start event in Global.asax that runs a sqlscript against my sql server to check the databas version. My problem is that sometimes the...
14
by: white lightning | last post by:
How to have <select onchange="this.form.submit()"and also a Submit button on one form? I have something like this: <form action="<?php $_SERVER; ?>" method="post"...
2
by: Chris Riesbeck | last post by:
In Firefox, IE and Opera, with a select menu with size 1, typing a few characters in the menu selects an item and triggers the onchange event. In the Webkit-based Safari and Google Chrome, the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.