checkbox and values

Discussion in 'Javascript' started by pusulv@gmail.com, Jun 18, 2005.

  1. Guest

    Hi,
    I got a site whit some checkbox-es whit some value-es.

    I really want to extract the value of only checked checkboxes and put
    them ni my script bellow.

    Here are some of my checkboxes:

    > <input type="checkbox" value="a=sweb&" /> Web results
    > <input type="checkbox" value="a=simage&" /> Image results


    ....and from this I only want to get the value from the checked
    checkboxes (there are some more than showed abou) an put the valu in
    the script bellow:

    > function goTo() {
    > var searchInput = document.getElementById("searchInput");
    > var url = 'http://a9.com/' +
    > encodeURI(searchInput.value.replace(/[\s]/gi, '+')) + '?' + ALL-CHECKED-CHECKBOX-VALUES-HERE.value;
    >
    > }


    But how do I do this?
     
    , Jun 18, 2005
    #1
    1. Advertising

  2. Jc Guest

    wrote:
    > Hi,
    > I got a site whit some checkbox-es whit some value-es.
    >
    > I really want to extract the value of only checked checkboxes and put
    > them ni my script bellow.
    >
    > Here are some of my checkboxes:
    >
    > > <input type="checkbox" value="a=sweb&" /> Web results
    > > <input type="checkbox" value="a=simage&" /> Image results

    >
    > ...and from this I only want to get the value from the checked
    > checkboxes (there are some more than showed abou) an put the valu in
    > the script bellow:
    >
    > > function goTo() {
    > > var searchInput = document.getElementById("searchInput");
    > > var url = 'http://a9.com/' +
    > > encodeURI(searchInput.value.replace(/[\s]/gi, '+')) + '?' + ALL-CHECKED-CHECKBOX-VALUES-HERE.value;
    > >
    > > }

    >
    > But how do I do this?


    Refer to http://www.jibbering.com/faq/#FAQ4_13
     
    Jc, Jun 18, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    579
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,430
    ThunderMusic
    Jan 25, 2006
  3. =?Utf-8?B?RG90TmV0RGV2?=

    DataGrid and embeded Checkbox..How to find if checkbox clicked

    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    864
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    585
    Jason Huang
    Jun 29, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    563
    Joey Pang
    Jun 13, 2005
Loading...

Share This Page