Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Adding items to a List

 
Thread Tools Search this Thread
Old 02-24-2004, 09:13 AM   #1
Default Adding items to a List


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
  Reply With Quote
Old 02-24-2004, 09:17 AM   #2
Els
 
Posts: n/a
Default Re: Adding items to a List

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 -

  Reply With Quote
Old 02-24-2004, 10:14 AM   #3
Craig
 
Posts: n/a
Default Re: Adding items to a List

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$ i.nl...
> 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 -
>



  Reply With Quote
Old 02-24-2004, 02:26 PM   #4
Mitja
 
Posts: n/a
Default Re: Adding items to a List

"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$ i.nl...
> > 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


  Reply With Quote
Old 02-25-2004, 08:45 AM   #5
Hywel Jenkins
 
Posts: n/a
Default Re: Adding items to a List

"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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump