event.keyCode works does not in Firefox

When I use this validation. Works fine in IE. Does not not in firefox.
Gives an error "undefined event".
How to solve this problem in firefox?

< input type = "text" name = "var_no" onKeyPress = "check (this); ">

function check (obj) {}
If (event.keyCode < 45 | event.keyCode > 57)
{
Alert ("correct to Enter value '");
obj. Focus();
event.keyCode = 0;
}
}

Instead of
event.keyCode = 0;
Try
Returns false;

In addition, the alert is really distracting from a user perspective. Very intrusive.

Some other visual cue, such as briefly to change the background of the box entry or even inserting text beside him, for example, is more user-friendly.

obj.style.Background = "Red";

Tags: ColdFusion

Similar Questions

  • FancyBox works does not in Firefox

    This viewer works fine in IE, Chrome, Safari and Opera, but not in Firefox.

    http://www.aptcoweb.com/dev/VIP/gallery.htm

    Any ideas?

    Sorry, I'm code challenged today. Work on a deadline of Photoshop.

    Nancy O.

  • Event delegation works does not in WebWorks

    After trying many different approaches, I decided to post here hoping for enlightment on my problems. I'm developing an application using WebWorks and jQuery Mobile. My environment is Eclipse with Torch 9800 (6.0.0.277) Simulator.

    I'm trying to view a simple list dynamically (generated from ajax call). I use event delegation to detect which item clicked by the user. This approach works well in my browsers (Chrome, Firefox), but fails in the Blackberry Simulator (also failed when I deployed to my device). The event handler will not catch just the click event.

    I simplified my code to isolate the problem. Here's my index.html page

    My Reksadana

    Back

    During initialization #pageMyRD (link to "pageCreate"), it will replace the content of #pageMyRDcontent through the ajax call. The content of the decision of the server as follows:

    
    

    The page makes well Simulator, user can move around the list view. Then, I tried to identify which element selected/clicked by the user. To do this, I have tried the event and technical delegation bubbling event in the tutorial, works great in my desktop browser, but failed in the Simulator.

    Some of the link, I tried to do a simple trick of the event as follows:

    $("#pageMyRD").live('pagecreate', function(event) {
       $(".myrd-item").live('click', function(event) {
          alert('Clicked on item!');
       });
    });
    
    $("#pageMyRD").live('pagecreate', function(event) {
       $("li").live('click', function(event) {
          alert('Clicked on item!');
       });
    });
    

    I even tried to move the class 'myrd-point' to the element, but still no luck. It seems that the click event is not at all fires, or failed to bind to the newly created items.

    However, I discovered a strange behaviour. If you return the listview, you will see an arrow on the right side of each item. If you click on the arrow, the event fires (alert Pop out). Using this approach, I managed to cross the parent element until I reached the element with class "myrd-agenda. Although this is an equitable solution, but this approach only applies to contact devices. Users with devices touchpad/trackball that scroll and click on an item sees no alert.

    I'm looking forward to lights. Many thank you in advance for anyone who has wanted to consult us on this subject.

    Problem solved. The problem is caused by the behavior of the contact devices. in the torch, touch events will also raise mouse events. Previously, I was trying to catch "click event" (a mouse event) by clicking on an element (without using the touchpad, so it is a key event). Instead of intercepting the mouse and touch events separately (where several response/alert), the solution is to combine the multiple event handler. Here's the code.

    $("#pageMyRD").live('pagecreate', function(event) {
       $(".myrd-item").live('click tap', function(event) {
          alert('Tapped and clicked on item!');
       });
    });
    

    Thank you for your kind assistance Praveen Fox , I hope that soon I'll be too "Developer level 1"

  • @font-face works does not in Firefox

    Hello

    I ended up working on how to add non-webfonts on board by the font squirrel generator. My fonts show perfectly on my scene, Safari, and Chrome, but firefox use my fonts back fall.

    This is the CSS code:

    {@font-face}

    do-family: 'de3_display_egyptianregular ';

    SRC: url('gdnegyde3reg-webfont.eot');

    SRC: url('gdnegyde3reg-webfont.eot?#iefix') format('embedded-opentype'),

    URL('gdnegyde3reg-webfont.woff') format ('woff'),

    URL('gdnegyde3reg-webfont.ttf') format ('truetype'),

    URL('gdnegyde3reg-webfont.svg#de3_display_egyptianregular') format ('svg');

    make-weight: normal;

    make-style: normal;

    }

    . ClassName {}

    do-family: "de3_display_egyptianregular", Georgia, Times, serif;

    do-size: 12px;

    color: #353535;

    }

    I add the font with the addition of fonts

    de3_display_egyptianregular, Times, Georgia, serif

    ".. rel="stylesheet"href="Fonts/stylesheet.css"type/css"media-"screen a link" title = "" charset = utf - 8 "/ >

    Did I miss something?

    On the link tag:

    Learn more about link tag.

  • Show/hide an element with the click of a button - Script works does not in Firefox

    Hi all

    Basically, I'm looking for show/hide a DIV with the click of a button.

    The script works in IE but fail in FF.

    I am sure that I am the problem here.

    <script type="text/javascript">

    function toggle(box) {
         var el = document.getElementById('box');
         el.style.display = (el.style.display != 'none' ? 'none' : '' );
         
         
         value = document.getElementById('content').value;
         if(value=="Show Calendar"){
         document.getElementById('content').value="Hide Calendar";
         }
         else{
         document.getElementById('content').value="Show Calendar";     
    }
    }
    </script>


    <style type="text/css">
    #box{
         background-color: #C0C0C0;
         height: 100px;
         width: 100px;
    }
    </style>
    </head>

    <body>

    <div id="box">
    </div>

    <input id="content" value="Hide Calendar" type="button" onclick="toggle(box)" />
    </body>
    </html>

    WE

    He also worked if you had changed-

    
    

    on this subject.

    
    
  • Flash 10.0 r12 works does not in Firefox

    I installed the latest version of Flash when you are prompted to by Firefox, but once I got it installed that I always get the message saying that I don't have the latest version of the flash player in the window where the graphics have to be display. I restarted Firefox and the system, but still no joy. Same thing happened on another computer as well.

    Someone help? !

    see you soon

    rritchey,

    > This happens on a single site or all websites in flash?

    That is a good question for Dafino, and here's why: a coating
    the scripts are better than others. In some cases, when a content creator
    incorporates the SWF for Flash Player 9 (or whatever the version), JavaScript code which
    tests for the installed version of the user only checks if the current version
    * at time * is installed. In other words, this Web site may be looking
    for Flash Player 9, rather than Flash Player 9 or higher.

    David Stiller
    Adobe Community Expert
    Dev blog, http://www.quip.net/blog/
    "Luck is the residue of good design."

  • with firefox 43 yahoo and yahoo mail doesn't work does not correctly

    With the help of win 7 and firefox 43.0.1, I have 4 computers and now all have problems with yahoo and yahoo mail doesn't work does not correctly. Loading sites, but most of the features are missing and clicking on what whether changes to the lists of text. I have disabled flash / anti-spam etc., cleared cookies and cache and even firefox loaded down once again and have upgraded, no help. I'm forced to use IE now.

    I tried Yahoo support, they said try Firefox... In any case, it's Firefox and I found a solution using the 'Refresh Firefox' button. Whatever the problem was fixed on two of my computers so far. Got to update my setting again but it's 10 m, compared to the 10 hours I spent trying all that is nothing.

    Thanks for the help!

  • Adobe flash player not working does not or does not appear as an application under Tools, options

    Adobe flash player not working does not or does not appear as an application under Tools, options

    If you can't Flash 11.3 to work and need to return to 11.2 Flash you can download Player Flash 11.2 through this direct link:

  • Change event - why is does not select the current value, just the previous value?

    Hello.

    I use the script when the user selects a value from the drop box, something visible text (using the ' presence')

    I use the change of the event, but it does not work very well. When I select a value, it does not change the text, but if I select another value, it will display the previous selected value.

    Why did he not synchronize the value?

    Thank you!!

    Hi Rafael,.

    I don't know if you are using an event well.

    mouseExit is something good to use (especially when paired with the mouseEnter), during the change of the visual appearance of an object. For example, a button where the legend is underlined on mouseEnter and not highlighted on mouseExit.

    If you want to change the presence of objects on the form that the flat user above the list drop-down, then mouseEnter/mouseExit should work. However, if you want the changes occur once the user selects an item in the drop-down list, I recommend the exit event.

    Here are some examples:

    https://Acrobat.com/#d=txGF4IAoqmfTKPrLkwybIA

    https://Acrobat.com/#d=OzNofi-xFxmpXD1MrVU6rA

    https://Acrobat.com/#d=Hi0ZwVgVB1PWbxc6OJ0z4A

    Hope these helps,

    Niall

    Ensure the dynamics

  • 14.04 the unit does not load firefox only gksudo or comments "will."

    for months 6 or so Firefox now stop launching from the icon of unity... done loading cycle ball and - nothing, it will only load Terminal gksudo firefox, or as a guest visitor. Literally hundreds of codes terminal by 'experts' have not... it seems that I am not recognised as an administrator/owner by Ubuntu or firefox... and it is not available as preview of bluefish (same problem) ubuntu is the only OS and firefox browser only. Please keep in mind that I receive responses by email.

    Terminal and firefox gives me this:
    (process: 14428): CRITICISM of GLib *: g_slice_set_config: assertion 'sys_page_size == 0' failed

    It is a warning that does not start Firefox.
    You don't explain if Firefox actually does start or not not when starting it leave a Terminal like cor - el suggested above.

    I just tried/etc/init. D/vmware install

    I don't know what you were trying to reach wrt VMware. It is clear from the above command that you have no idea of what you do on the CLI. Your other comments it seems that you try arbitrary commands you have picked up various items without understanding what they mean.
    Stop it. It will do you no good.

  • I changed my setting in private browsing and now does not open firefox. Any ideas?

    I changed my setting in private browsing and now does not open firefox. Any ideas?

    Never mind. After about an hour of not opening, I clicked on the icon and its opening. Maybe someone can explain that.

  • Comments on some Web sites section does not appear Firefox 26.0

    comments on some sites does not appear Firefox 26.0

    I find the problem. It's the add-on "do not follow.

  • WIFI doesn't work does not correctly after driver update

    I have a DESIRE 4 laptop 1023tu with operating system Windows 8 PRO. My WIFI works does not properly after the update drievr.

    Problems...

    1. When you try to connect to a wifi hotspot the quick adapter turns off and allows the card instantly

    2. after connected, sometimes no internet access and the problem turns off only after reconnecting to the netwrok after setting off.

    If the update doesn't work not for you then do as I explained in my previous post and roll back to the previous driver. This philosophy can be applied to all updates.

    If there is no pressure or emerging reason to update to your PC or laptop works just great... do not update. (this is especially true when it comes to an update of the BIOS)

    For your question #2, the problem could be your wireless (modem, router or access point) which causes the connection dropped.

    Best regards
    ERICO

  • my microsoft work does not work error message that I need to reinstall, but I don't have a disck because it was already installed when I bought at walmart

    I bought my dell computer 2009 Wal-Mart, that he has is already set up with windows vista basic... and now my microsoft works does not work it says I have to reinstall.  However, he is not come with a disc. so, how can I do without having to buy a disc

    Go here: https://smartsource.dell.com

    This is where you go to download programs that have been installed on your computer that you do not have a CD for.

  • Guest account does not open firefox, wpc?

    Guest account does not open firefox, required wpc. What is a wpc? I am tech challenged.

    Hello

    1 what happens, when you try to start Firefox in the guest account?

    2. don't you get an error message, please specify the full error message.

    Try it mentioned below for the methods to solve the problem:

    Method 1:

    Try to repair the installation of Firefox.

    Method 2:

    You can try to uninstall and reinstall Firefox. You can download Firefox from the below link:

    http://www.getfirefox.NET/

    NOTE: Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    You can also ask your question in the forum of Firefox for additional help:

    http://support.Mozilla.com/en-us/questions

Maybe you are looking for

  • Cannot select pictures library to external hard drive for apple tv

    Have recently copied to iTunes and pictures libraries in external hard drive. Both apps work well on iMac, on iTunes Apple TV is fine but unable to select Library of Photos from external hard drive via iTunes / folder / Home sharing / choose photos t

  • Comcast does not open on Firefox - keeps loading and stop.

    Comcast thought the browser support has been altered, so I uninstalled Firefox and reinstalled. Same problem persists. I can open Comcast on IE, but don't want to! Norton was performed a complete analysis and find nothing. Help, please! Operating sys

  • How to get my Blackjack WMP to work?

    I have a Samsung Blackjack thru ATT phone. No use of a simple internet phone. I like to use WMP for my music file, but after downloading music to the playbakc it gives me the error 0 x 80070003. I think that I followed the procedure to download corre

  • Pavilion dvd-1275mx: halt during POST

    To light, illumination of the keyboard (sound, dvd controls, wireless, etc.) normally light and fan runs briefly.  Then the fan stops.  After 10 seconds, the lock Maj and stop scroll lights start flashing together every 2 seconds.  This continues ind

  • Unable to turn on media streaming in Windows 7 Professional

    I currently have Windows 7 Professional x 86 installed. When I try to turn on media streaming continuously, the gray button and after a few seconds, the button is clickable again, but nothing has changed. I searched the internet and read what to do a