Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Adding items to a List

Reply
Thread Tools

Adding items to a List

 
 
Craig
Guest
Posts: n/a
 
      02-24-2004
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?


 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      02-24-2004
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 vo. O resto imperfeito.
- Renato Russo -

 
Reply With Quote
 
 
 
 
Craig
Guest
Posts: n/a
 
      02-24-2004
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" <(E-Mail Removed)> wrote in message
news:403b161e$0$41752$(E-Mail Removed) 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 vo. O resto imperfeito.
> - Renato Russo -
>



 
Reply With Quote
 
Mitja
Guest
Posts: n/a
 
      02-24-2004
"Craig" <(E-Mail Removed)> wrote in message
news:403b240b$0$17830$(E-Mail Removed).. .
> 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" <(E-Mail Removed)> wrote in message
> news:403b161e$0$41752$(E-Mail Removed) 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 vo. 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
 
Hywel Jenkins
Guest
Posts: n/a
 
      02-25-2004
"Craig" <(E-Mail Removed)> wrote in message news:<403b15d1$0$17814$(E-Mail Removed)> ...
> 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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to retrieve listbox items on postback , items moved usingjavascript between 2 list boxes (source and target ) divya ASP .Net 1 05-28-2008 05:27 AM
Is there any way to append some items to List box, without retrieving all items through AJAX? Anjan Bhowmik ASP .Net 1 02-14-2008 09:02 PM
Adding extra items to a drop down list pitcher17 ASP .Net 4 04-19-2004 10:43 PM
Adding attributes to items in a dropdown list Joe Molloy ASP .Net 3 12-18-2003 06:44 PM
grouping items among a list according to items subtag value Gilles Kuhn XML 0 09-15-2003 12:01 PM



Advertisments