#1
  1. No Profile Picture
    How do you know you exist, are you sure your not part of anothers dream
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    mo
    Posts
    28
    Rep Power
    0

    Information made in javascript -> to php session


    <select id=Cat7 name=Cat7 onChange="OnChangeCategory(7, -1, -1);">


    I have information that is dynamicly created and added or subtracted in a form field now what I want to do is send this information to a php session how do I go about this.

    here is the information that it is send for cat7

    arrItems7[0] = new Array('AOC 17" 7elr 12" 1280 x 1024', 149, 10030, 0);
    arrItems7[1] = new Array('AOC 9klr 19" .26DP 1600 x 1200', 271, 10031, 1);


    thanks
    can't fall asleep clowns will eat me
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2001
    Location
    Toronto, Ontario, Canada
    Posts
    631
    Rep Power
    13
    wat u can do is put the info in a form then submit it.

    or

    have php create a temp file, echo the script language, document.write() the info you want. then open the file in php and extract the info.
  4. #3
  5. No Profile Picture
    How do you know you exist, are you sure your not part of anothers dream
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    mo
    Posts
    28
    Rep Power
    0
    I am a dummy and you just went over my head how do i go about this anymore help would be greatly appreciated.
    can't fall asleep clowns will eat me
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Posts
    21
    Rep Power
    0
    I've just done a similar thing, where I needed info in a form to be edited through javascript by the user, and the final result passed to a session

    my solution is not very elegant, but all I did was create another form that only contained hidden fields (so the user doesn't know anything about it)

    then, when my user has finished messing, and wants to submit the form, they click on the submit button (which is actually the only visable element of the hidden form) this then triggers some java script that copies the info from the first form into the second,just before the second is submitted.

    'course I did it that way, because I'd allready used the submit action on the first form for something else.

    you could just get java script to copy the information you want submitted to some hidden fields in your main form.

    whooa, lots of words, any help?

    Matt
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Posts
    21
    Rep Power
    0

    Question


    Just a thought, do you just want information on using sessions in PHP?

    http://www.devshed.com/Server_Side/P...ons/page1.html

    Matt

IMN logo majestic logo threadwatch logo seochat tools logo