strange javascript behaviour PIE 
Author Message
 strange javascript behaviour PIE

For some unknown reason Pocket Internet Explorer does'nt
want to run the following script
although it runs fine with normal browsers.
Any help would be great.

Mike

The following code generates an error '(null) line:14
Character:10
Error: (null)'
Line 14:

destList.options[destLen] = new Option(srcList.options
[i].text,
srcList.options[i].value);

(the complete test script):

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>test</title>

<script language="JavaScript1.1">

// Add all selected source items to destination list.
function addToDestList()
{
   var srcList = window.document.form1.srcList;
   var destList = window.document.form1.destList;
   var srcLen = srcList.options.length;
   var destLen = destList.options.length;

   for (var i = (srcLen - 1); i >= 0; i--)
   {
      if ((srcList.options[i] != null) && (srcList.options
[i].selected
== true))
      {
         destList.options[destLen] = new
Option(srcList.options[i].text, srcList.options[i].value);
         destLen++;
         srcList.options[i] = null;
      }
  }

Quote:
}

</script>
</head>

<body>
   <form name="form1" method="post" >

               <select name="srcList" multiple>
                  <option value="1">Option 1</option>
                  <option value="2">Option 2</option>
                  <option value="3">Option 3</option>
               </select>
            <input type="button" value=" &gt;&gt; "
onclick="javascript:addToDestList();" name="button"><br>
               <select name="destList" multiple>
               </select>
      </form>
</body>
</html>



Tue, 05 Apr 2005 15:32:28 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Strange behaviour of GV

2. Strange behaviour of psnup (PSutils)

3. Strange layers' behaviour in Netscape Navigator

4. Strange ADODB behaviour

5. Strange globalVM behaviour in GS 4.03

6. Strange behaviour inside VBScript function (Active Server Page)

7. Need help with strange, subtle behaviour in IE

8. ByRef - Strange behaviour

9. WScript.Echo strange behaviour

10. GhostScript 2.6.1 on AXP - Strange behaviour...

11. help with strange '==' behaviour

12. ASP JScript. switch strange behaviour

 

 
Powered by phpBB® Forum Software