is the bind() method broken for the change event in jquery 1.4.1?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

is the bind() method broken for the change event in jquery 1.4.1?

tg @oh
I have some code that works in jquery 1.3.2 but does not in 1.4.1. Not
sure where this should go, just started using jquery when 1.3.2 came
out. Is this the right forum? jquery site still pointing here, but I
thought they moved off of google?

        $(document).ready(function() {
            alert("document ready!");
            $("#lineItems input:last").bind("change",
appendLineItem).focus();
            //window.onbeforeunload = stopRefresh;
        });

        function appendLineItem() {
            alert("prior value:"+priorValue);
            if ($(this).val() != priorValue) {
                priorValue = $(this).val();
                showAlert = true;
                lineCnt++;
                var len = $("#lineItems input").length + 1;
                $("#lineItems").append('<tr><td><input type="text"
class="normal" name="_Override_SSN_' + len +
                '" /></td><td><input type="text" class="normal"
name="_Override_Perscription_Number_' + len + '" /></td></tr>')
                $(this).unbind("change", appendLineItem);
                $("#lineItems input:last").bind("change",
appendLineItem).focus();
            }
            else {
                $(this).val("").focus();
                return false;
            }
        }


                    <table id="lineItems">
                        <tr>
                            <th>
                                Member SSN
                            </th>
                            <th>
                                Perscription Number
                            </th>
                        </tr>
                        <tr>
                            <td>
                                <input type="text" class="normal
required" name="_Override_SSN_1" />
                            </td>
                            <td>
                                <input type="text" class="normal
required" name="_Override_Perscription_Number_1" />
                            </td>
                        </tr>
                    </table>


Terry

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: is the bind() method broken for the change event in jquery 1.4.1?

John Resig
Administrator
Yes, we've moved to the new forum:
http://forum.jquery.com/

And this issue has already been fixed and will be in 1.4.2:
http://dev.jquery.com/ticket/5851

--John



On Wed, Feb 3, 2010 at 6:02 PM, tg @oh <[hidden email]> wrote:

> I have some code that works in jquery 1.3.2 but does not in 1.4.1. Not
> sure where this should go, just started using jquery when 1.3.2 came
> out. Is this the right forum? jquery site still pointing here, but I
> thought they moved off of google?
>
>        $(document).ready(function() {
>            alert("document ready!");
>            $("#lineItems input:last").bind("change",
> appendLineItem).focus();
>            //window.onbeforeunload = stopRefresh;
>        });
>
>        function appendLineItem() {
>            alert("prior value:"+priorValue);
>            if ($(this).val() != priorValue) {
>                priorValue = $(this).val();
>                showAlert = true;
>                lineCnt++;
>                var len = $("#lineItems input").length + 1;
>                $("#lineItems").append('<tr><td><input type="text"
> class="normal" name="_Override_SSN_' + len +
>                '" /></td><td><input type="text" class="normal"
> name="_Override_Perscription_Number_' + len + '" /></td></tr>')
>                $(this).unbind("change", appendLineItem);
>                $("#lineItems input:last").bind("change",
> appendLineItem).focus();
>            }
>            else {
>                $(this).val("").focus();
>                return false;
>            }
>        }
>
>
>                    <table id="lineItems">
>                        <tr>
>                            <th>
>                                Member SSN
>                            </th>
>                            <th>
>                                Perscription Number
>                            </th>
>                        </tr>
>                        <tr>
>                            <td>
>                                <input type="text" class="normal
> required" name="_Override_SSN_1" />
>                            </td>
>                            <td>
>                                <input type="text" class="normal
> required" name="_Override_Perscription_Number_1" />
>                            </td>
>                        </tr>
>                    </table>
>
>
> Terry
>
> --
> You received this message because you are subscribed to the Google Groups "jQuery Development" group.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to [hidden email].
> For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.

Reply | Threaded
Open this post in threaded view
|

Re: is the bind() method broken for the change event in jquery 1.4.1?

tg @oh
Thanks for the reply here!

Not sure why I went here, just tried again from the Discussion Button
on the jquery.com home page and it is going to the new forum.

I'll switch back to 1.4 when I see 1.4.2 available.

Terry


On Feb 3, 6:11 pm, John Resig <[hidden email]> wrote:

> Yes, we've moved to the new forum:http://forum.jquery.com/
>
> And this issue has already been fixed and will be in 1.4.2:http://dev.jquery.com/ticket/5851
>
> --John
>
>
>
> On Wed, Feb 3, 2010 at 6:02 PM, tg @oh <[hidden email]> wrote:
> > I have some code that works in jquery 1.3.2 but does not in 1.4.1. Not
> > sure where this should go, just started using jquery when 1.3.2 came
> > out. Is this the right forum? jquery site still pointing here, but I
> > thought they moved off of google?
>
> >        $(document).ready(function() {
> >            alert("document ready!");
> >            $("#lineItems input:last").bind("change",
> > appendLineItem).focus();
> >            //window.onbeforeunload = stopRefresh;
> >        });
>
> >        function appendLineItem() {
> >            alert("prior value:"+priorValue);
> >            if ($(this).val() != priorValue) {
> >                priorValue = $(this).val();
> >                showAlert = true;
> >                lineCnt++;
> >                var len = $("#lineItems input").length + 1;
> >                $("#lineItems").append('<tr><td><input type="text"
> > class="normal" name="_Override_SSN_' + len +
> >                '" /></td><td><input type="text" class="normal"
> > name="_Override_Perscription_Number_' + len + '" /></td></tr>')
> >                $(this).unbind("change", appendLineItem);
> >                $("#lineItems input:last").bind("change",
> > appendLineItem).focus();
> >            }
> >            else {
> >                $(this).val("").focus();
> >                return false;
> >            }
> >        }
>
> >                    <table id="lineItems">
> >                        <tr>
> >                            <th>
> >                                Member SSN
> >                            </th>
> >                            <th>
> >                                Perscription Number
> >                            </th>
> >                        </tr>
> >                        <tr>
> >                            <td>
> >                                <input type="text" class="normal
> > required" name="_Override_SSN_1" />
> >                            </td>
> >                            <td>
> >                                <input type="text" class="normal
> > required" name="_Override_Perscription_Number_1" />
> >                            </td>
> >                        </tr>
> >                    </table>
>
> > Terry
>
> > --
> > You received this message because you are subscribed to the Google Groups "jQuery Development" group.
> > To post to this group, send email to [hidden email].
> > To unsubscribe from this group, send email to [hidden email].
> > For more options, visit this group athttp://groups.google.com/group/jquery-dev?hl=en.- Hide quoted text -
>
> - Show quoted text -

--
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.