Javascript event.keyCode

Hello,
I've been trying to setup a webpage with a form and a submit button. The submit button is a rollover image button that I did with javascript, so as a result, it's made life a little more complicated for submitting the actual value of the "button" if I have more than one button in the form. I wrote some scripts for the buttons to pass values, and they work fine, but then comes the issue if they hit the return/enter key and need it to pass some default value which I did here:
<form id="login_form" action="login.php" method="post" name="login_form" onkeypress= "if (event.keyCode == 13) { document.loginform.submitvalue.value = 'Login'; document.login_form.submit(); }">
Using IE and Firefox, if I hit return or enter, "Login" is passed.
In safari 2.0 or 3.0b, if I hit return, it's passed.
If I hit enter, it's not.
Is there some sort of problem with enter and event.keyCode, or is there another way to go about this (and I do want to avoid redoing all of it in CSS)

hi thomas,
we do know that some functionalities are not being supported by PocketIE, however
i couldn't find any supporting statements that it really doesn't support a specific
functionality just like this case. "it's not supported" reason is just a last resort...
from the official statement of MS:
http://msdn2.microsoft.com/en-us/library/ms838095.aspx
Microsoft Pocket Internet Explorer is updated on Pocket PC 2003
Pocket Internet Explorer has been updated to support the following:
HTML 4.01
Extensible HTML (XHTML)
Cascading style sheets
Microsoft JScript® version 5.5
Enhanced scripting and Document Object Model support
Wireless Markup Language (WML) 2.0 (XHTML + WML 1.x)
Internet Protocol version 6 (IPv6) in IPv4/IPv6 mixed-mode environments
New extensible imaging library
jo

Similar Messages

  • Can't be modify the value of window.event.keyCode in IE 11(Windows 7 Premium) where as in IE 8 (Windows XP) its working fine

    The following is the sample code whcih I have used to check.<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Sample Form</title>
    <script type="text/javascript">
    function keyDownEvent() {
    alert("KD:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KD:"+window.event.keyCode);
    function keyPressEvent() {
    alert("KP:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KP:"+window.event.keyCode);
    </script>
    </head>
    <body>
    <form>
    <input type="text" onkeydown="keyDownEvent()" onkeypress="keyPressEvent()" />
    </form>
    </body>
    </html>
    Kindly post your answers, am waiting for answers...

    This is the TechNet Forum for questions regarding
    Internet Explorer 8, 9, 10, 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.
    For better assistance please ask for help in the MSDN
    IE Development Forums.
    Thanks & Regards,
    Vincenzo Di Russo
    Microsoft® MVP Windows Internet Explorer, Windows & Security Expert - since 2003.
    Moderator in the Microsoft Community and TechNet Forums
    My MVP Profile

  • How to call a bean method from javascript event

    Hi,
    I could not find material on how to call a bean method from javascript, any help would be appreciated.
    Ralph

    Hi,
    Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
    Cheers,
    Ralph

  • JavaScript events

    How can I use javascript events with ADF Faces components 11

    This is not possible as the framework is based on JSF, which at its core is a server-side framework. ADF Faces RC provides some facilities for JavaScript events, but these are a complement not a replacement for server-side events.
    Regards,
    ric

  • Integrate javascript event into Oracle ADF Components

    Can someone show me how to use javascript attribute, for instance onclick, in CoreCommandButton? How do we normally integrate javascript event into Oracle ADF Components?

    Hi,
    you already have a link. Its not an Oracle project but a project of Wilfred from Eurotransplant. Feel free to ping him directly on this or ask this question on the Forms forum, if you haven't already, where he most likely is signed up for.
    Frank

  • Portal Forms (9ias) JavaScript Event Handlers

    For each form field it is possible to write event handlers in Javascript e.g OnFocus
    //On BLUR effectively prevents the field from ever gaining
    //focus.
    this.blur();
    There are no PL/SQL event handlers at field level. Is there any way that we can call PL/SQL code from the Javascript event?
    Thanks in Advance.

    In case of do_event(), you can do a view source of the form's runtime page and lookup the code. It's a simple javascript that set values to some hidden variables.
    When you do a view source , you will find some javascripts like :-
    <SCRIPT TYPE="text/javascript" SRC="<some-url>">
    Copy the url and paste it on a new browser window and try to access it. In case of IE, it will prompt you for a file download. Download the file as a text file and you will get to see the code.

  • Handling Custom JavaScript Events from HtmlLoader Class

    Hey guys, just a quick question, Is it possible to handle custom javascript events just the way standard events like locationchange and DOMInitialized are handled. Say for example a HTML5 slide application that dispatches custom events when the user moves from one slide to another. I know there is an option to use ExternalInterface to talk to AS3 but for this project of mine, this is not an oiption as this HTML5 Presentation doesnt have any swf content to bridge with.
    Its just a thought since the HTMLloader has access to the javascript window object(or am i wrong). Would it be possible to access a custom function as a prototyped property of the window Object.
    Any form of tip/clarification will be appreciated.
    thanks!

    Use the HTMLHost class. You create a subclass of HTMLHost and override certain methods that are called in response to certain JavaScript behaviors. Then you assign an instance of your HTMLHost to the HTMLLoader's htmlHost property. (Since you're using the Flex HTML component, you would assign your HTMLHost subclass instance to the HTML control's htmlHost property.)

  • ADFFaces (JSF ADF) javascript events vs button actions

    Hello,
    I currently have a jspx with the following components:
    af:selectOneChoice
    Onclick=#{backing_bean.myDropdownMethod}
    AutoSubmit=true
    af:commandButton
    Action=#{backing_bean.myButtonMethod}
    af:inputText
    Value=#{bindings.TransientVoSomeData.inputValue}
    the Backing_bean class methods are as follows:
    myDropdownMethod {
    TransientVoRow.setAttribute("someData", "someValue"); // called in AM via OperationBinding
    TransientVoRowIterator.execute();
    myButtonMethod {
    TransientVoRowIterator.execute();
    Basically, the dropdown fires the onclick event when changed, and successfully calls the AM to populate the transient VO attribute with some value (i verified this in the debugger and the VOIterator row does hold the data). However, the af:inputText does not display the value at this point. I must click the button, which does exactly the same call, and ONLY THEN is the data in the VOIterator row displayed in the af:inputText on the page. Also, it seems that clicking the button also causes the dropdown's Onclick event to fire...don't know if this affects it.
    Can anyone suggest an easy approach to causing the af:inputText to display the data directly after the onclick event, without having to refresh the page or invoke another event? Do I have to resort to AJAX, or can i survive with the built-in javascript events?
    thanks

    Try defining partial page rendering between your list and your textItem.
    http://download.oracle.com/docs/html/B25947_01/web_complex004.htm#CEGBBGEG

  • How to write an JavaScript Event Handler for Portal Form?

    I have created an form in Portal builder.
    There are two column, R04 and R05.
    I need to use Javascript Event Handler to check if R04 value is smaller than R05 value.
    Can I be able to build up this function?
    Can anyone give me a hint? or steps?
    Thanks

    Here are some suggestions.
    1. do what we did, and write your own protocol server that understands whatever custom commands you need, and then write a custom thin client which will send commands to and receive responses from this protocol server. you can use any language for the client software. the protocol server should be written in java so that it can receive commands from the client and then use the 9iFS API to execute the requests or retrieve the data that the client wants to display.
    2. write a custom fat client, in java, that accesses the 9iFS API directly. this means that each client will be accessing the iFS schema on the database machine directly. if you configure the iFS service on the client to use the THIN driver, then you won't need to install the Oracle client software on the client machine. You'll just need all the iFS .jar files and the database's JDBC driver (classes12.zip). Note that using the THIN driver is not supported because of bugs and performance problems. If you use the OCI8 driver, which is supported, then you'll have to install the whole Oracle client software package on the client machine.
    3. write a thin client that uses the WebDAV protocol, and communicate with our built-in DAV server. this approach will allow you to execute any command that DAV understands. you may be able to find some free HTTP or DAV client software on the net, or you can try writing it yourself. this is probably a better solution than number 1 unless you really need to send custom commands that are not in our DAV server's vocabulary.

  • Javascript events received in configurator scripts

    Can javascript events from photoshop like a new layer being created be sent to a configurator script function like in the HTML or a configurator embedded script? 

    You need check the document of extended script or Photoshop SDK, Configurator just generate a UI wrapper.
    So by my understanding, if you can do it in a normal *.jsx, then you can try add it to configurator panel.
    Check the exported panel folder, you can found a file with name <YourPanelName>.jsx. You can add your callback function there.
    Or you can create a standalone .jsx file, and use the scriptfile button.
    Or you can copy your .jsx file to preset/scripts, then call it as an menu item.

  • Load rdlc report in reportviewer on javascript Event

    Can I Load RDLC report to ReportViewer  in Run Time on javascript event.
    protected void Page_Load(object sender, EventArgs e){
    if (Request.QueryString.Count == 0){//Request from Client-side (Javascript event)
    if (Request["HTTP_X_REQUESTED_WITH"] == "XMLHttpRequest"){
    ReportViewer1.ProcessingMode = ProcessingMode.Local;
    ReportViewer1.LocalReport.ReportPath = Server.MapPath("Reports\\Report2.rdlc");
    ReportViewer1.Visible = true;
    StreamReader str = new StreamReader(Request.InputStream);
    String strbuf = str.ReadToEnd().Normalize();
    QSerializer ser = new QSerializer();
    QCriteria Cri = ser.DeSerialize<QCriteria>(strbuf);
    if (!String.IsNullOrEmpty(Cri.Name))
    SqlDataSource1.SelectCommand = "select * from ZClient.TItem where ClientNx = 3";
    ReportViewer1.DataBind();
    ReportViewer1.LocalReport.Refresh();

    Hi Devgen,
    In my opinion, this thread is related to Report Control forum. So please post thread on that forum for more effective response. Thank you for understanding. Please refer to the following link.
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=vsreportcontrols.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Documentation for JavaScript event handlers

    Hi!
    Can someone tell me where(link) could I find documentation or
    examples for JavaScript event handlers.
    THANK YOU!

    There are realy many javascript resources on the web. These are
    2 of them:
    http://www.webdevelopersjournal.com/JavaScriptWeenie.html
    http://www.tech.irt.org/articles/js058/
    Hi!
    Can someone tell me where(link) could I find documentation or
    examples for JavaScript event handlers.
    THANK YOU!

  • Adding a javascript event to a dynamically loaded content

    Hello,
    I am new to adobe air. I am trying to create a desktop application with html and javascript. I have a page that reads data from db and lists each  records as links (a href). I need to assign an onclick event for each link.
    both
    foreach result {
         <a href="#" onclick="foo()">bla bla</a>
    and
    foreach result {
         document.getElementById('container').innerHTML = '<a href="#" id="link_id">bla bloa</a>';
         document.getElementById('link_id').addEventListener("click", function() { foo(); });
    With the second  solution it  only workd  for the last record
    What am I missing ?
    I appreciate any help.
    Thanks.

    I always recommend using a javascript framework such as jQuery for building JS AIR applications. If you're already using jQuery, or plan on it then look into jQuery's live binding:
    http://api.jquery.com/live/
    Essentially what it does is "listen" for new DOM elements that match events you're watching for and add them to your existing bindings. It's very simple. Your example below becomes:
    $('a').live('click', function(){
         // do something

  • Javascript events - onchange toggle forms

    Hi, below is where im at now. Ive got my JS toggling on and
    off a form from any selection below. Allt he options below turn on
    the same form. My problem is that i dont understand how to make the
    option "Estate Agent" toggle on/off a different form. Could anyone
    offer some please help? tar
    <select name="select" id="select"
    onchange="javascript:showForm(this.value, servdetails);">
    <option value="0">Select...</option>
    <option value="1">Architect</option>
    <option value="2">Caterer</option>
    <option value="3">Estate Agent</option>
    <option value="4">Garden/Landscape
    Designer</option>
    <option value="5">Interior Designer</option>
    <option value="6">Surveyor</option>
    <option value="7">Structural Engineer</option>
    <option value="8">Solicitor</option>
    <option value="9">Vet</option>
    <option value="10">Other professional</option>
    </select>

    hi,
    Please follow the suggestions for Saving a form:
    // Saving the form is done at the application level, so you need to invoke the
    Acrobat app model.
    App.executeMenuItem("SaveAs"); // The end user will be prompted to specify a
    file name.
    // However, you must save the form silently if the form needs to be certified
    and the certificate must be trusted for privileged JavaScript.
    var mydoc = event.target;
    mydoc.saveAs();
    Thanks,
    kris

  • Javascript event handling

    The following code is being executed three times in the
    following sequence:
    1) On initialization of my Flex application, initCallback()
    is called
    2) When I broadcast a 'getUserPreferencesFromCookie' event,
    handleGetUserPreferenceCookie() is called.
    3) When I broadcast a 'writeUserPreferencesCookie' event,
    handleWriteUserPreferenceCookie() is called.
    // Callback when flash is initialized
    var initCallback = function()
    // Add all event listeners
    FABridge.flash.root().getPreferences().addEventListener(
    "getUserPreferencesFromCookie",
    handleGetUserPreferenceCookie);
    FABridge.flash.root().getPreferences().addEventListener(
    "writeUserPreferencesCookie",
    handleWriteUserPreferenceCookie);
    FABridge.flash.root().getPreferences().faBridgeInitialized();
    // Listen for flash initialization (i.e. the Main application
    is created)
    FABridge.addInitializationCallback("flash", initCallback);
    // Event handler for Get User Preferences Cookie Events
    events
    var handleGetUserPreferenceCookie = function(readEvent)
    alert("Getting Cookie for user: " +
    readEvent.getUsername());
    if (readEvent.getUsername())
    var theCookie = readCookie(readEvent.getUsername());
    alert("Returned from readCookie: '" + theCookie + "'");
    var preference = FABridge.flash.root().getPreferences();
    if (preference)
    if (preference.setPreferenceCookie)
    preference.setPreferenceCookie(theCookie);
    else
    FABridge.flash.root().getPreferences().setPreferenceCookie(null);
    // Event handler for Write User Preferences Cookie Events
    events
    var handleWriteUserPreferenceCookie = function(writeEvent)
    alert("Creating Cookie for User");
    if (writeEvent)
    alert("Write event is defined");
    var username = writeEvent.getUsername();
    if (username)
    // Create a cookie given the username and the XML
    createCookie(writeEvent.getUsername(),
    writeEvent.getData());
    alert("Returned from creating cookie");
    else
    alert("Write event is undefined");
    alert("Write cookie method completed");
    Here is the problem:
    handleGetUserPreferences() completes as expected (i.e. the
    cookie string is set into my preferences object). The readEvent is
    a custom event that extends flash.events.Event. However, when
    writeUserPreferenceCookie is called, the line
    writeEvent.getUsername() fails. writeEvent is the same type of
    event as readEvent. And when I say 'fails' I mean that the method
    goes no further. I never see the 'Write cookie method completed'
    alert. There are no errors in the Javascript Error Console.
    I've checked the writeEvent on the action script side. The
    username has been set into the event the same way that it was set
    into the readEvent. I cannot see why I can get data out of the
    readEvent but not the writeEvent.
    ANY help would be much appreciated.
    -Julie

    Just because the forums are a little slow on a weekend...
    JavaScript functions should be declared in the HEAD of an HTML page. I wasn't aware that a function declared in the BODY writes to a new document, so I've also learned something out of this.
    Take this and work on it to place the output where you want it:<html><head><script type="text/javascript"><!--
      function clickfunction()
        //if (registration.purpose[0].checked==true)
          document.getElementById("stuffHere").innerHTML = "Name of School/ College: <input type=text name=sname><br>Grade / Year:<input type=text name=grade>";
    !--></script></head>
    <body>
      <table>
        <tr>
          <td><font size = "" color="purple">Age:</font></td>
          <td><input type = "text" name = "age" size = "10" maxlength = "3"></td>
        </tr>
        <tr>
          <td><font size = "" color = "purple">Select the best reason
            <br>to use the Library:</font></td>
          <td><input type = "radio" name = "purpose" value = "school" onClick = "clickfunction()">
            <font size = "" color = "purple" >School / College</font><br>
              <input type = "radio" name = "purpose" value="work">
                <font size = "" color = "purple">Work</font><br>
              <input type = "radio" name="purpose" value="personal">
                <font size = "" color = "purple">Personal</font>
          </td>
          <!--// SET AN ID ON THE ELEMENT! //-->
          <td id="stuffHere"></td>
        </tr>
      </table><br>
      <form>
        <input type="Submit" name="register" value="Register" align="MIDDLE">
        <input type="reset" name="clear" value="Clear Form" align="MIDDLE">
      </form>
    </body></html>db
    -- next time, no JavaScript questions, please!
    edit What you wanted to do was<div id="div1" style = 'display:none;'>and in the functiondocument.getElementById("div1").style.display = "block";Edited by: Darryl.Burke

Maybe you are looking for

  • Not able to open rule designer in Calc manager in Workspace

    I have installed Hyperion 11.1.2.2 on Win2003 sp2. My IE version is 7. When I try to write/edit a Business rule in calc manager, I get a warning in 'your current security settings do not allow websites to use ActiveX ie7....Your page may not display

  • SCOM 2012 E-mail Notifications

    I am monitoring router interfaces on SCOM.   One particular interface on the router we can only use the class of objects, Interface. On the dashboard I created, I can select a router and the description shows the MIB2 name for PATH.  I set up an e-ma

  • How to dynamically connect Extend client to proxy server?

    Hi, Is it possible to do programmatically? My client should decide at run time to which node it will connect. Thanks, Denis.

  • Release 15- RSS feed

    I dont know how many of you guys have seen release 15 yet but i have got access to it on our Staging instance. They have included a feature of RSS feed on the home page . i had a question on this . The Rss feed which we are using is from a website wh

  • Problem Printing to Large Format Printers From SGD

    I am having a problem printing to large format printers when using the PDF printing option for SGD. The SDG Universal PDF Viewer recognizes the print format that I specify but on the client device side the pdf that is produced is always Letter size.