[OU] JavaScript Question

Joel Hammer Joel
Mon May 17 11:35:26 PDT 2004


Well, I think I know what is happening, but not why.

When you try to immediately "unclick" a button after it is clicked,
opera will not to it (6.02 in linux). You have to have a slight delay,
say 600 milliseconds, before you are able to unclick the button.

No big deal but:

1. You have to make explicit accomodation for this in your javascript.

2. IE doesn't have this problem. So, since most web sites are written
for IE, this is the sort of minor problem which might make opera less
able to browse.

Joel

On Fri, Jul 26, 2002 at 10:55:19PM -0400, Joel Hammer wrote:
> Just puzzled by this. I am writing some javascript code.
> So far, opera (6.01) in linux has performed identically to
> internet explorer in windows. Very nice.
> However, I think I have found a bug in the javascript
> implementation in opera. The following code:
> if (typeof n == "object");
>                  form[name].checked = false;   
> 
> works fine in IE but doesn't in opera. There is no error generated by opera
> with it either. 
> (As soon as this if statement runs, a function is called
> which checks the checked status of this form element, and then changes the
> checked status of another form element depending on the status of this element.)
> (n is the variable returned from a prompt box,eg. n = prompt(etc...) )
> If I put an alert statement in there, like so:
> 
> if (typeof n == "object"){
>                  alert ("You pressed cancel")
>                  form[name].checked = false}
> 
> Then it works fine in both opera and IE. Other delays solve the problem,
> too. A statement like:
> A construct like:
> if (typeof n == "object"){
>                  for (var i = 0;i < 500;i++){var j = 1} 
>                  form[name].checked = false}
> 
> works, but if the 500 is change to 100 it doesn't work.
> Other types of statements, eg.  var zz = 1  don't help.
> Has anybody seen this type of behavior in javascript or other computing
> languages?
> Any insight appreciated,
> Joel
>    
> -- 
> Opera-users: http://list.opera.com/mailman/listinfo/opera-users
> More lists: http://list.opera.com/mailman/listinfo/
> Unsubscribe: mailto:opera-users-request at opera.com?subject=unsubscribe



More information about the Linux-users mailing list