Advanced Search

Results 1 to 2 of 2

Thread: echoing value of checkboxes using php and javascript

  1. #1
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default echoing value of checkboxes using php and javascript

    hi,
    i have an array of checkboxes which i am calling from the database. onchecking each checkbox the value should be concanated to a variable.
    say i have 3 checkboxes with values a,b,c if i check the first checkbox then a variable say $var should be = to a then if i check the second checkbox $var=a,b any idea how to achieve this?

    Thanks in advance,
    Sukanya

  2. #2
    Join Date
    Sep 2008
    Posts
    56
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default echoing value of checkboxes using php and javascript

    Hi Sukanya,

    You will have to trap the onChecked event of the checkboxes and write a JS function which will reconstruct the value of this variable.

    Hope this helps.

    Cheers,

    ~Maneet Puri
    Lexolution IT Services
    Web Design & Development Services

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •