SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Qatar
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy javascript coding ,,,help!

    hi,

    In javascript i want the checked boxes values to go to the text field values randomly,,that is ,if i check the 4rth check box,,it's value should go to 1rst textfield ,,and if i check the 6th checkbox ,,its value should go to the 2nd textfield,,and similiarly like that,,

    Please help me,,iam desperate!!

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So...you actually don't want them to 'go.....randomly' but in sequence, each one to the next available field? If so, what happens if the user un-checks a box? Should the checkboxes be 'once-only' - check it and it 'sticks'? More details!!
    Last edited by adios; Oct 12, 2003 at 14:58.
    ::: certified wild guess :::

  3. #3
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Qatar
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy javascript coding,,plz help

    Quote Originally Posted by adios
    So...you actually don't want them to 'go.....randomly' but in sequence, each one to the next available field? If so, what happens if the user un-checks a box? Should the checkboxes be 'once-only' - check it and it 'sticks'? More details!!

    okay the details are here,,

    There is one page containning textfields and a submit button,When i click the submit button ,a new page opens containning checkboxes, with corresponding textfields and submit button,.Now when i check the boxes on the second page, and click the submit button ,the values of the corresponding textfields ,go to the corresponding textfields in the first page,, meaning

    that if i check the 3rd checkbox in the second page, the value of the textfield corresponding to the 3rd checkbox in the second page goes to the third textfield in the first page ,,and similarly ,if i check the 5th checbox,the corresponding textfield value in the second page,goes to the 5th textfield in the first page,,and hence skipping the textfields,,which i dont want to happen

    I want the values from the randomly checked boxes textfield in the second page,to go the first pages textfields in a sequence ,starting from the first textfield and then second ,,third ,,,,,,in the first page

    I hope you understood what i have told

    cheers

    vidya

  4. #4
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Qatar
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy javascript coding,,plz help

    Quote Originally Posted by adios
    So...you actually don't want them to 'go.....randomly' but in sequence, each one to the next available field? If so, what happens if the user un-checks a box? Should the checkboxes be 'once-only' - check it and it 'sticks'? More details!!
    No the check boxes are not check once only,,kind
    okay the details are here,,

    There is one page containning textfields and a submit button,When i click the submit button ,a new page opens containning checkboxes, with corresponding textfields and submit button,.Now when i check the boxes on the second page, and click the submit button ,the values of the corresponding textfields ,go to the corresponding textfields in the first page,, meaning

    that if i check the 3rd checkbox in the second page, the value of the textfield corresponding to the 3rd checkbox in the second page goes to the third textfield in the first page ,,and similarly ,if i check the 5th checbox,the corresponding textfield value in the second page,goes to the 5th textfield in the first page,,and hence skipping the textfields,,which i dont want to happen

    I want the values from the randomly checked boxes textfield in the second page,to go the first pages textfields in a sequence ,starting from the first textfield and then second ,,third ,,,,,,in the first page

    I hope you understood what i have told

    cheers

    vidya

  5. #5
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope you understood what i have told
    Sorry, lost you at the 3rd checkbox in the second page...or was it the corresponding textfields in the first page...the value of the textfield corresponding to the 3rd checkbox in the second page? If I could understand what you were trying to accomplish - instead of how you'd decided to accomplish it - probably would help. Oh, well...it's Monday again. Anyone else have an idea? (sorry)
    ::: certified wild guess :::

  6. #6
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Talk about Who's on first! [img]images/smilies/smile.gif[/img]
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  7. #7
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...or this...
    ::: certified wild guess :::

  8. #8
    SitePoint Member millsrd's Avatar
    Join Date
    Oct 2003
    Location
    Colfax, Washington, USA
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lets get simple" three check boxes with three text values on page one

    cat
    dog
    fish

    On page one we checked box 2, text value dog, and go to page 2.
    Yes.
    On page two we have three text values and three check boxes

    water
    food
    air

    On page two we checked box three, text value air.
    Yes
    Now we return to page one and find (I hope)

    cat
    dog
    air

    If this ain't it then the immortal words of Barbarino come to mind,
    I'm so confused.
    Last edited by millsrd; Oct 13, 2003 at 19:28.

  9. #9
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Qatar
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by millsrd
    Lets get simple" three check boxes with three text values on page one

    cat
    dog
    fish

    On page one we checked box 2, text value dog, and go to page 2.
    Yes.
    On page two we have three text values and three check boxes

    water
    food
    air

    On page two we checked box three, text value air.
    Yes
    Now we return to page one and find (I hope)

    cat
    dog
    air

    If this ain't it then the immortal words of Barbarino come to mind,
    I'm so confused.






    okay,,i will tell in ,,,,, an hopefully a better way

    iam having a page with textfields and iam having an another page having checkboxes.
    Now when i check these boxes , i want the values of the checkboxes to go to the textfields ,in a sequence ,starting from the first textfield.

  10. #10
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Better!

    When you say 'page', do you mean 'window' (as in 'popup')? S.vidya: just describe it from a user's perspective..."I do this, pop-up opens with checkboxes, I check three boxes, main window textfields are populated, in sequence, with checkbox values, then I close window..."

    It's all good.
    ::: certified wild guess :::

  11. #11
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Qatar
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by adios
    Better!

    When you say 'page', do you mean 'window' (as in 'popup')? S.vidya: just describe it from a user's perspective..."I do this, pop-up opens with checkboxes, I check three boxes, main window textfields are populated, in sequence, with checkbox values, then I close window..."

    It's all good.

    u are exactly right!!
    In the words u say,,,
    There is a main window having textfields,and there is a popup window having checkboxes,when i check these boxes ,which i do in random,i want the values of the checked boxes to be in the main window textfields in a sequence.

  12. #12
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    Getting there. One last question (sure)..what if the user changes their selection? Unchecks one box and checks another. See how that upsets the original 'sequence'? That's why I asked if you wanted to 'lock in' the user's original sequence so that it couldn't be altered.

    Might help to know what you need this for.
    ::: certified wild guess :::

  13. #13
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Qatar
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks u so,,,,,,,, much adios,
    u are really great!!
    This code was what i wanted,,,,Atlast,,I got it


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
  •