[jQuery] Re: validate - error in IE6

2008-11-25 Thread gnix
Thanks for noticing that. I made those changes but the error messages
keep coming.

On Nov 24, 6:21 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:
 I didn't notice at first, but also, your input tags aren't closed
 properly either:

 Should be:
 input class=mls_textSmall type=text
 name=txtZip id=txtZip value= /

 On Nov 24, 8:19 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:

  Your META tag isn't closed properly so this is probably your starting
  point for investigation. Make sure your page validates before you
  start to dig into the JavaScript.

  On Nov 24, 7:21 pm, jquery_newbie [EMAIL PROTECTED] wrote:

   I am trying to run my page with the Validator code but on loading it
   in IE6 I get the Expected ; error followed by Object doesn't
   support this property or method errors. It has absolutely no problems
   in Firefox3. Strangely enough when I comment out the META http-
   equiv=Content-Type content=text/html; charset=UTF-8 line the
   Expected ; error disappears although the validation still does not
   work. Here's my page:

   -
   !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
   html
   head
   META http-equiv=Content-Type content=text/html; charset=UTF-8
   titletest/title
   script type=text/javascript src=jquery.js/script
   script type=text/javascript src=jquery.validate.pack.js/script
   script id=demo type=text/javascript
                           $(function() {

                                   !-- form validation --
                                   $('#frmFilterEvents').validate({
                                           rules: {
                                                   txtStartDate: {
                                                           //sutterdate: 
   true,
                                                           required: 
   #txtEndDate:filled
                                                   },
                                                   txtEndDate: {
                                                           //sutterdate: 
   true,
                                                           required: 
   #txtStartDate:filled
                                                   },
                                                   txtZip: {
                                                           minlength: 5,
                                                           maxlength: 5
                                                   }
                                           },
                                           messages: {
                                                   txtStartDate: mm/dd/ 
   required,
                                                   txtEndDate: mm/dd/ 
   required,
                                                   txtZip: Zip is 5 digits
                                           },
                                           errorPlacement: function(error, 
   element) {
                                                   if ( element.is(:radio) 
   )
                                                           error.appendTo( 
   element.parent().next().next() );
                                                   else if ( 
   element.is(:checkbox) )
                                                           error.appendTo ( 
   element.next() );
                                                   else
                                                           error.appendTo( 
   element.parent() );
                                           }
                                   });

                                   
   $('button[name=submitFilter]').click(function() {
                                   return $('#frmFilterEvents').valid();
                           });
                           })
   /script
   /head
   body style=margin:0;background-color:#FF; class=mls_member
   tpl-3col

           div class=mls_sidebar id=mls_left
             div class=mls_navSub mls mls_colLf
               dl
                 dtFilter Events/dt
                 dd
                   form action=  id=frmFilterEvents method=post

                     fieldset
                     legendDates/legend
                     ol class=mls_dates
                       li
                         label for=txtStartDateFrom/label
                         span class=ui-datepicker-wrap
                         input class=mls_text datePick type=text
   name=txtStartDate id=txtStartDate value=
                         /span /li
                       li
                         label for=txtEndDateTo/label
                         span class=ui-datepicker-wrap
                         input class=mls_text datePick type=text
   name=txtEndDate id=txtEndDate value=
                         /span /li
                     /ol
                     /fieldset
                     fieldset class=mls_last
        

[jQuery] Re: validate - error in IE6

2008-11-25 Thread gnix

Actually, I found the problem. Apparently it was an encoding issue. My
page uses UTF-8 encoding which messes up the validation plugin.
Instead, this is what the experts recommend:
---
@Greg: Thanks for investigating this. I guess the trouble is this:
jquery.validate.js is encoded as ISO-8859-1. The browser uses the
encoding of the page if it isn't specified for the script.

So a workaround specifies the encoding of the script by setting the
charset (eg. script type=text/javascript src=jquery.validate.js
charset=ISO-8859-1″/script.
---
Specifying the encoding at the script level saved my day!

On Nov 25, 9:11 am, gnix [EMAIL PROTECTED] wrote:
 Thanks for noticing that. I made those changes but the error messages
 keep coming.

 On Nov 24, 6:21 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:

  I didn't notice at first, but also, your input tags aren't closed
  properly either:

  Should be:
  input class=mls_textSmall type=text
  name=txtZip id=txtZip value= /

  On Nov 24, 8:19 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:

   Your META tag isn't closed properly so this is probably your starting
   point for investigation. Make sure your page validates before you
   start to dig into the JavaScript.

   On Nov 24, 7:21 pm, jquery_newbie [EMAIL PROTECTED] wrote:

I am trying to run my page with the Validator code but on loading it
in IE6 I get the Expected ; error followed by Object doesn't
support this property or method errors. It has absolutely no problems
in Firefox3. Strangely enough when I comment out the META http-
equiv=Content-Type content=text/html; charset=UTF-8 line the
Expected ; error disappears although the validation still does not
work. Here's my page:

-
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
head
META http-equiv=Content-Type content=text/html; charset=UTF-8
titletest/title
script type=text/javascript src=jquery.js/script
script type=text/javascript src=jquery.validate.pack.js/script
script id=demo type=text/javascript
$(function() {

!-- form validation --
$('#frmFilterEvents').validate({
rules: {
txtStartDate: {
//sutterdate: 
true,
required: 
#txtEndDate:filled
},
txtEndDate: {
//sutterdate: 
true,
required: 
#txtStartDate:filled
},
txtZip: {
minlength: 5,
maxlength: 5
}
},
messages: {
txtStartDate: 
mm/dd/ required,
txtEndDate: mm/dd/ 
required,
txtZip: Zip is 5 
digits
},
errorPlacement: function(error, 
element) {
if ( 
element.is(:radio) )
error.appendTo( 
element.parent().next().next() );
else if ( 
element.is(:checkbox) )
error.appendTo 
( element.next() );
else
error.appendTo( 
element.parent() );
}
});


$('button[name=submitFilter]').click(function() {
return $('#frmFilterEvents').valid();
});
})
/script
/head
body style=margin:0;background-color:#FF; class=mls_member
tpl-3col

div class=mls_sidebar id=mls_left
  div class=mls_navSub mls mls_colLf
dl
  dtFilter Events/dt
  dd
form action=  id=frmFilterEvents method=post


[jQuery] Re: validate - error in IE6

2008-11-24 Thread DumpsterDoggy
Your META tag isn't closed properly so this is probably your starting
point for investigation. Make sure your page validates before you
start to dig into the JavaScript.

On Nov 24, 7:21 pm, jquery_newbie [EMAIL PROTECTED] wrote:
 I am trying to run my page with the Validator code but on loading it
 in IE6 I get the Expected ; error followed by Object doesn't
 support this property or method errors. It has absolutely no problems
 in Firefox3. Strangely enough when I comment out the META http-
 equiv=Content-Type content=text/html; charset=UTF-8 line the
 Expected ; error disappears although the validation still does not
 work. Here's my page:

 -
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html
 head
 META http-equiv=Content-Type content=text/html; charset=UTF-8
 titletest/title
 script type=text/javascript src=jquery.js/script
 script type=text/javascript src=jquery.validate.pack.js/script
 script id=demo type=text/javascript
                         $(function() {

                                 !-- form validation --
                                 $('#frmFilterEvents').validate({
                                         rules: {
                                                 txtStartDate: {
                                                         //sutterdate: true,
                                                         required: 
 #txtEndDate:filled
                                                 },
                                                 txtEndDate: {
                                                         //sutterdate: true,
                                                         required: 
 #txtStartDate:filled
                                                 },
                                                 txtZip: {
                                                         minlength: 5,
                                                         maxlength: 5
                                                 }
                                         },
                                         messages: {
                                                 txtStartDate: mm/dd/ 
 required,
                                                 txtEndDate: mm/dd/ 
 required,
                                                 txtZip: Zip is 5 digits
                                         },
                                         errorPlacement: function(error, 
 element) {
                                                 if ( element.is(:radio) )
                                                         error.appendTo( 
 element.parent().next().next() );
                                                 else if ( 
 element.is(:checkbox) )
                                                         error.appendTo ( 
 element.next() );
                                                 else
                                                         error.appendTo( 
 element.parent() );
                                         }
                                 });

                                 
 $('button[name=submitFilter]').click(function() {
                                 return $('#frmFilterEvents').valid();
                         });
                         })
 /script
 /head
 body style=margin:0;background-color:#FF; class=mls_member
 tpl-3col

         div class=mls_sidebar id=mls_left
           div class=mls_navSub mls mls_colLf
             dl
               dtFilter Events/dt
               dd
                 form action=  id=frmFilterEvents method=post

                   fieldset
                   legendDates/legend
                   ol class=mls_dates
                     li
                       label for=txtStartDateFrom/label
                       span class=ui-datepicker-wrap
                       input class=mls_text datePick type=text
 name=txtStartDate id=txtStartDate value=
                       /span /li
                     li
                       label for=txtEndDateTo/label
                       span class=ui-datepicker-wrap
                       input class=mls_text datePick type=text
 name=txtEndDate id=txtEndDate value=
                       /span /li
                   /ol
                   /fieldset
                   fieldset class=mls_last
                   legendLocation/legend
                   ol
                     li
                       label for=selMilesWithin/label
                       select name=selMiles id=selMiles
                         option value=1010 Miles/option
                         option value=2020 Miles/option
                         option value=5050 Miles/option
                       /select
                     /li
                     li
                       label for=txtZipof Zip Code/label
                       input class=mls_textSmall type=text
 name=txtZip 

[jQuery] Re: validate - error in IE6

2008-11-24 Thread DumpsterDoggy
I didn't notice at first, but also, your input tags aren't closed
properly either:

Should be:
input class=mls_textSmall type=text
name=txtZip id=txtZip value= /

On Nov 24, 8:19 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:
 Your META tag isn't closed properly so this is probably your starting
 point for investigation. Make sure your page validates before you
 start to dig into the JavaScript.

 On Nov 24, 7:21 pm, jquery_newbie [EMAIL PROTECTED] wrote:

  I am trying to run my page with the Validator code but on loading it
  in IE6 I get the Expected ; error followed by Object doesn't
  support this property or method errors. It has absolutely no problems
  in Firefox3. Strangely enough when I comment out the META http-
  equiv=Content-Type content=text/html; charset=UTF-8 line the
  Expected ; error disappears although the validation still does not
  work. Here's my page:

  -
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  html
  head
  META http-equiv=Content-Type content=text/html; charset=UTF-8
  titletest/title
  script type=text/javascript src=jquery.js/script
  script type=text/javascript src=jquery.validate.pack.js/script
  script id=demo type=text/javascript
                          $(function() {

                                  !-- form validation --
                                  $('#frmFilterEvents').validate({
                                          rules: {
                                                  txtStartDate: {
                                                          //sutterdate: true,
                                                          required: 
  #txtEndDate:filled
                                                  },
                                                  txtEndDate: {
                                                          //sutterdate: true,
                                                          required: 
  #txtStartDate:filled
                                                  },
                                                  txtZip: {
                                                          minlength: 5,
                                                          maxlength: 5
                                                  }
                                          },
                                          messages: {
                                                  txtStartDate: mm/dd/ 
  required,
                                                  txtEndDate: mm/dd/ 
  required,
                                                  txtZip: Zip is 5 digits
                                          },
                                          errorPlacement: function(error, 
  element) {
                                                  if ( element.is(:radio) )
                                                          error.appendTo( 
  element.parent().next().next() );
                                                  else if ( 
  element.is(:checkbox) )
                                                          error.appendTo ( 
  element.next() );
                                                  else
                                                          error.appendTo( 
  element.parent() );
                                          }
                                  });

                                  
  $('button[name=submitFilter]').click(function() {
                                  return $('#frmFilterEvents').valid();
                          });
                          })
  /script
  /head
  body style=margin:0;background-color:#FF; class=mls_member
  tpl-3col

          div class=mls_sidebar id=mls_left
            div class=mls_navSub mls mls_colLf
              dl
                dtFilter Events/dt
                dd
                  form action=  id=frmFilterEvents method=post

                    fieldset
                    legendDates/legend
                    ol class=mls_dates
                      li
                        label for=txtStartDateFrom/label
                        span class=ui-datepicker-wrap
                        input class=mls_text datePick type=text
  name=txtStartDate id=txtStartDate value=
                        /span /li
                      li
                        label for=txtEndDateTo/label
                        span class=ui-datepicker-wrap
                        input class=mls_text datePick type=text
  name=txtEndDate id=txtEndDate value=
                        /span /li
                    /ol
                    /fieldset
                    fieldset class=mls_last
                    legendLocation/legend
                    ol
                      li
                        label for=selMilesWithin/label
                        select name=selMiles id=selMiles
                          option value=1010 Miles/option