SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot jooles's Avatar
    Join Date
    Jun 2006
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Browser Incompatibilities

    This works and FF and not in IE. I have no idea what I'm doing wrong.

    Code:
    <head>
    <script language="JavaScript" type="text/javascript">
    
    function preview(haha){
    document.getElementById("container").innerHTML=haha;
    }
    
    </script>
    </head>
    
    <body>
    
    <input type="text" onkeyup="preview(this.value)">
    <div id="container"></div>
    
    <body>
    Browser incompatibilities own me.

    edit: onmouseover seems to work fine, but not onkeyup... According to this website: http://msdn.microsoft.com/workshop/a...ts/onkeyup.asp onkeyup should work with <input type="text">...

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works fine in IE 6. A tip, you might wanna have the container element stored in a global variable. It does now a lookup in the DOM every time the preview function is called.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •