List Info

Thread: Re: onmousewheel firefox problem




Re: onmousewheel firefox problem
country flaguser name
United States
2008-03-27 12:51:02

The event handler "onmousewheel" is not defined in the W3C HTML
standard for <input type=";text" ...>. This page lists what is standard
for the <input&gt; tag:
http://www.w3.org/TR/REC-html40/interact/forms.html#adef-type-INPUT

FireFox deals with standards much better than IE. The fact that your
code works on IE but not FireFox proves this.

--Tim Sabin

> The following works in IE, but not in FireFox. I don't actually need
it
&gt; to work in IE...only in FireFox.
>
> Basically scrolling up should increase the number in the text field
and
&gt; scrolling down should reduce it.
>
> What would be the FireFox version of this?
&gt;
> Thanks!
> Cait
>;
> ---------------
&gt;
> <script>
>
> function incQuantity(amt){
> var quant = document.getElementById("size").value;
&gt; if( !isNaN(quant)){
&gt; quant = Number(quant) + amt;
>; if(quant&lt;1)
> quant=1;
> document.getElementById("size").value = quant;
&gt; }
> }
>
> function wheelIncQuantity(){
> var amt=0;
&gt; if (event.wheelDelta >= 120)
>; incQuantity(1);
&gt; else if (event.wheelDelta <= -120)
&gt; incQuantity(-1);
&gt;
> return false;
&gt; }
>
> </script>
>;
>
>
> size <input onmousewheel="return wheelIncQuantity();&quot; type=";text"
> name=";size2"; id="size"/&gt;
>
>
>
>
> ------------------------------------
&gt;
> Visit http://aiaiai.com for more groups to joinYahoo! Groups Links
&gt;
>
>
>

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )