Hi Romeo,

Welcome to jQuery!  The question that you asked is better suited for
the main jQuery group: http://groups.google.com/group/jquery-en

This group specifically deals with jQuery UI, which is built upon
jQuery and used for UI manipulation and effects.

That said, here's the power of jQuery to handle your problem (not
tested)...

function returnDelete()
{
     if ($("input:checked", "#standardView").size() > 0)
     {
          $("#delState").val("DeleteMode");
          $("#pageNO").val("1");
          $("#standardView").submit();
     }
     else
     {
          alert("Please select at least one!");
     }
}

Hth,

Dave


On Nov 9, 9:24 pm, Romeo <[email protected]> wrote:
> Dear Group Members,
>
> I am a beginner of jquery. And I would like to ask for help to convert
> from javascript function to jquery by the code below (my problems is
> checkbox array):
>
> function returnDelete() {
>                 $check = 0;
>                 with (document.standardView) {
>                         for (var i=0; i < elements.length; i++) {
>                                 if ((elements[i].type == 'checkbox') && 
> (elements[i].checked ==
> true)){
>                                         $check = 1;
>                                 }
>                         }
>                 }
>
>                 if ( $check == 1 ){
>                         document.standardView.delState.value = 'DeleteMode';
>                         document.standardView.pageNO.value=1;
>                         document.standardView.submit();
>                 }else{
>                         alert("please select at lease one!");
>                 }
>
> }
>
> I hope everyone can help me.
>
> Best regards,
>
> Romeo

--

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


Reply via email to