Adding items to a List

Discussion in 'HTML' started by Craig, Feb 24, 2004.

  1. Craig

    Craig Guest

    I have an editbox, with an add butoon next to it. The add button should add
    what ever the user enters into the dit box, into a listbox.

    When the save button is clicked (Using PHP here), the contents of the box
    must be written to a table.

    Is this possible?
    Craig, Feb 24, 2004
    #1
    1. Advertising

  2. Craig

    Els Guest

    Craig wrote:

    > I have an editbox, with an add butoon next to it. The add button should add
    > what ever the user enters into the dit box, into a listbox.
    >
    > When the save button is clicked (Using PHP here), the contents of the box
    > must be written to a table.
    >
    > Is this possible?


    Sounds like a guestbook...

    --
    Els

    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Els, Feb 24, 2004
    #2
    1. Advertising

  3. Craig

    Craig Guest

    No, it's a page where you can add names to a database. But it must be done
    at once. Not add a line, write database, add a line, write database.. etc.

    It must be add items to list, then write when the save button is clicked.

    "Els" <> wrote in message
    news:403b161e$0$41752$...
    > Craig wrote:
    >
    > > I have an editbox, with an add butoon next to it. The add button should

    add
    > > what ever the user enters into the dit box, into a listbox.
    > >
    > > When the save button is clicked (Using PHP here), the contents of the

    box
    > > must be written to a table.
    > >
    > > Is this possible?

    >
    > Sounds like a guestbook...
    >
    > --
    > Els
    >
    > Sonhos vem. Sonhos vão. O resto é imperfeito.
    > - Renato Russo -
    >
    Craig, Feb 24, 2004
    #3
  4. Craig

    Mitja Guest

    "Craig" <> wrote in message
    news:403b240b$0$17830$...
    > No, it's a page where you can add names to a database. But it must be done
    > at once. Not add a line, write database, add a line, write database.. etc.
    >
    > It must be add items to list, then write when the save button is clicked.
    >
    > "Els" <> wrote in message
    > news:403b161e$0$41752$...
    > > Craig wrote:
    > >
    > > > I have an editbox, with an add butoon next to it. The add button

    should
    > add
    > > > what ever the user enters into the dit box, into a listbox.
    > > >
    > > > When the save button is clicked (Using PHP here), the contents of the

    > box
    > > > must be written to a table.
    > > >
    > > > Is this possible?

    > >
    > > Sounds like a guestbook...
    > >
    > > --
    > > Els
    > >
    > > Sonhos vem. Sonhos vão. O resto é imperfeito.
    > > - Renato Russo -
    > >

    >
    >


    Not a very elegant solution, but here goes:

    1) EditBox no. 1 - user input goes here
    2) ListBox - here you display the names user has already entered
    3) *hidden* EditBox - you fill in this one (using JavaScript) with something
    like
    "this is name1|this is the second name|foo|bar"

    You may choose any separator, not neccessarily |, of course. Just make sure
    users don't enter a line containing your separator. Anyway, the contents of
    this hidden EditBox is the what your script should read and parse
    appropriately, probably using a split() function or something similar.

    Mitja
    Mitja, Feb 24, 2004
    #4
  5. "Craig" <> wrote in message news:<403b15d1$0$17814$>...
    > I have an editbox, with an add butoon next to it. The add button should add
    > what ever the user enters into the dit box, into a listbox.
    >
    > When the save button is clicked (Using PHP here), the contents of the box
    > must be written to a table.
    >
    > Is this possible?


    http://developer.irt.org/script/form.htm#4

    --
    Hywel
    Hywel Jenkins, Feb 25, 2004
    #5
    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. Joe Molloy
    Replies:
    3
    Views:
    4,756
    nfedin
    Dec 18, 2003
  2. pitcher17

    Adding extra items to a drop down list

    pitcher17, Apr 19, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    4,148
    Alvin Bruney [MVP]
    Apr 19, 2004
  3. Gilles Kuhn
    Replies:
    0
    Views:
    434
    Gilles Kuhn
    Sep 15, 2003
  4. Anjan Bhowmik
    Replies:
    1
    Views:
    468
    Misbah Arefin
    Feb 14, 2008
  5. divya
    Replies:
    1
    Views:
    1,085
    Munna
    May 28, 2008
Loading...

Share This Page