Re: Completely OT

Discussion in 'Python' started by inhahe, Nov 30, 2009.

  1. inhahe

    inhahe Guest

    On Mon, Nov 30, 2009 at 12:49 PM, Victor Subervi
    <> wrote:
    >
    >
    > On Mon, Nov 30, 2009 at 1:39 PM, inhahe <> wrote:
    >>
    >> i'm pretty new to javascript programming, but i'm pretty sure you just
    >> need ajax, which AFAIK is a highly technical way of saying "using
    >> javascript in a way that makes web pages interactive"
    >> JSON afaik is a way of data to and from the server that allows for
    >> lists and more variable types and such, but also requires the user
    >> download a third-party js file that implements JSON.  i don't think
    >> you'd technically need JSON, because you could simply send the server
    >> a string of all the colors selected delimited by a space or | or
    >> something.
    >> javascript also probably has inherent functions for generating xml,
    >> considering that the object you use to communicate with the server is
    >> an xmlhttprequst. but i think xml might be overkill in this case.
    >>
    >> the javascript would populate the list for the colors the user selects
    >> (the easiest way would probably be to give the list an id and use
    >> getElementByID()), and then when he's done it would create an
    >> xmlhttprequest object to send the data to the server.

    >
    > If I'm not mistaken, that won't help me actually print to screen the user's
    > choices as he selects them, which in my application, is important. Please
    > advise.
    > TIA,
    > V



    sure, that's where this part comes in:

    the javascript would populate the list for the colors the user selects
    (the easiest way would probably be to give the list an id and use
    getElementByID())

    so basically you'd define, e.g., an onClick="blah('red'); return true"
    within the red element's tag, and then define a function blah(x) that
    says
    getElementById("my_list_id").innerHtml += "<br>" + x;
    and of course give your list textarea an id="my_list_id" attribute in the tag.

    that could be slightly wrong, my javascript's rusty
    inhahe, Nov 30, 2009
    #1
    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. Jeff S
    Replies:
    1
    Views:
    351
    Scott Allen
    Jan 20, 2004
  2. vMike
    Replies:
    0
    Views:
    301
    vMike
    Jan 23, 2004
  3. =?Utf-8?B?RGltaXRyaXMgUGFudGF6b3BvdWxvcw==?=

    I completely disagree

    =?Utf-8?B?RGltaXRyaXMgUGFudGF6b3BvdWxvcw==?=, Jul 2, 2004, in forum: ASP .Net
    Replies:
    11
    Views:
    614
    Kevin Spencer
    Jul 6, 2004
  4. Comfort
    Replies:
    1
    Views:
    456
    Enrique Santa Cruz
    Nov 5, 2004
  5. Jeremy S.
    Replies:
    6
    Views:
    496
    Jeremy S.
    Jan 22, 2005
Loading...

Share This Page