[jQuery] Can some one convert simple code to jQuery

2009-03-12 Thread FlashWebHost.com

Can some one convert following code to jQuery ?

function check(value)
{
x = document.bulk_import.elements.length;
for(i=0;ix;i++)
{
if(document.bulk_import.elements[i].name == 'article_id[]')
{
document.bulk_import.elements[i].checked = value;
}
}
}

The function is used to check/uncheck all check box.


[jQuery] Re: Can some one convert simple code to jQuery

2009-03-12 Thread FlashWebHost.com

I want to check all check boxes. I made a search and made following
page

http://nancy.bizhat.com/jquery_check_box.html

When check box near Check All clicked, i need all other check boxes
get checked.

Now it is not working, the problem seems with the selection with $
(inp...@name=article_id)

Can anyone tell why it is not working ?


On Mar 12, 4:11 pm, jezmck j...@powder-blue.com wrote:
 It looks like that code does more than simply check a single box.

 It would be helpful to explain in more detail what you actually need
 it to do.
 And include the relevant HTML if possible.

 There is a lot of jQuery checkbox code out there, so go Googling, and
 don't expect people to just write your code for you if it's simple.

 On Mar 12, 10:38 am, FlashWebHost.com flash...@gmail.com wrote:

  Can some one convert following code to jQuery ?

  function check(value)
  {
          x = document.bulk_import.elements.length;
          for(i=0;ix;i++)
      {
                  if(document.bulk_import.elements[i].name == 'article_id[]')
          {
                          document.bulk_import.elements[i].checked = value;
                  }
          }

  }

  The function is used to check/uncheck all check box.


[jQuery] Re: Can some one convert simple code to jQuery

2009-03-12 Thread FlashWebHost.com

Thanks all, i got it fixed now by removing @ from the beginning name=

$(input[name='article_id[]']).each(function(){



On Mar 12, 9:32 pm, FlashWebHost.com flash...@gmail.com wrote:
 I want to check all check boxes. I made a search and made following
 page

 http://nancy.bizhat.com/jquery_check_box.html

 When check box near Check All clicked, i need all other check boxes
 get checked.

 Now it is not working, the problem seems with the selection with $
 (inp...@name=article_id)

 Can anyone tell why it is not working ?

 On Mar 12, 4:11 pm, jezmck j...@powder-blue.com wrote:

  It looks like that code does more than simply check a single box.

  It would be helpful to explain in more detail what you actually need
  it to do.
  And include the relevant HTML if possible.

  There is a lot of jQuery checkbox code out there, so go Googling, and
  don't expect people to just write your code for you if it's simple.

  On Mar 12, 10:38 am, FlashWebHost.com flash...@gmail.com wrote:

   Can some one convert following code to jQuery ?

   function check(value)
   {
           x = document.bulk_import.elements.length;
           for(i=0;ix;i++)
       {
                   if(document.bulk_import.elements[i].name == 
   'article_id[]')
           {
                           document.bulk_import.elements[i].checked = value;
                   }
           }

   }

   The function is used to check/uncheck all check box.


[jQuery] Re: Can't get typed value of input

2009-03-01 Thread FlashWebHost.com

It works fine for me,  you should have made some mistake.

Just create a test page and upload to your web site with java scripts,
that is easy to see the problem.



On Jan 22, 6:09 pm, abhisek abhisek.d...@gmail.com wrote:
 Thanks for your response.
 I think that was a livequery issue. Used the following function to get
 input elements:
 document.getInputByName = function(name)
 {
         allInputs = document.getElementsByTagName(input);
         for(i=0;iallInputs.length;i++)
         {
                 if(allInputs[i].getAttribute(name) == name  allInputs
 [i].getAttribute(type) == text)
                 {
                         mainInput = allInputs[i];
                         break;
                 }
         }
         return mainInput;}

 Then access the value like:
 input = document.getInputByName(some_name);
 value = input.value;

 Regards
 Abhisek


[jQuery] How PHP script can return two variables ?

2009-01-30 Thread FlashWebHost.com

I use jQuery $.ajax to submit user comment to a PHP Script.

The PHP script validate the user data, if it is OK, user comment is
written to mysql database. If not it will show error message.

Now the script print error message and success message same way.

I need PHP script pass one more value, to identify it is an error or
success message.

If it is success, i need to remove the comment box.