Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. JavaScript problem for IE 6.0

JavaScript problem for IE 6.0

Scheduled Pinned Locked Moved ASP.NET
javascripthelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thomasa
    wrote on last edited by
    #1

    I have a javascript on my page that handels onkey event:

    function OnKeyPress(evt)
    {
    if(this.GetKey(evt)==13)
    {
    var txtCtrl=this.GetTextBoxCtrl();
    var sBtnIDtoClick=txtCtrl.getAttribute('btnIDtoClick');
    if(sBtnIDtoClick != "")
    {
    var btnControl = document.getElementById(sBtnIDtoClick);
    btnControl.click();
    }
    }
    return true;
    }

    This works fine in Internet Explorer 7.0 but not for IE 6.0. (The problem is that the

    btnControl.click();

    is not fired) All other JavaSripts works fine, like:

    function OnKeyUp(evt)
    {
    var nKey;
    nKey=this.GetKey(evt);

    	if ((nKey!=38) && (nKey!=40) && (nKey!=13))
    	{
    		var sNewValue;
    		sNewValue=this.GetTextBoxValue();
    

    }
    }

    Anyone know why? Thanks Thomas

    C 1 Reply Last reply
    0
    • T thomasa

      I have a javascript on my page that handels onkey event:

      function OnKeyPress(evt)
      {
      if(this.GetKey(evt)==13)
      {
      var txtCtrl=this.GetTextBoxCtrl();
      var sBtnIDtoClick=txtCtrl.getAttribute('btnIDtoClick');
      if(sBtnIDtoClick != "")
      {
      var btnControl = document.getElementById(sBtnIDtoClick);
      btnControl.click();
      }
      }
      return true;
      }

      This works fine in Internet Explorer 7.0 but not for IE 6.0. (The problem is that the

      btnControl.click();

      is not fired) All other JavaSripts works fine, like:

      function OnKeyUp(evt)
      {
      var nKey;
      nKey=this.GetKey(evt);

      	if ((nKey!=38) && (nKey!=40) && (nKey!=13))
      	{
      		var sNewValue;
      		sNewValue=this.GetTextBoxValue();
      

      }
      }

      Anyone know why? Thanks Thomas

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Wild guess - it's not supported in IE 6.0.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups