473,378 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Point me in the right direction

Can someone please point me in the right direction?

This is what I want to accomplish.

The page has a simple form for input on it. When a user enters in
information and clicks the button, the current list of items is
displayed. So, if the page looks like this:

-----------------
| tweeking | Add
-----------------

Current List
one
three

After Add
one
three
tweeking

I was thinking array, I think I will have to add it to an array and
then rewrite the array to the page.

Thanks!
Jul 20 '05 #1
1 1490
or****@hotmail.com (A. Name) writes:
The page has a simple form for input on it. When a user enters in
information and clicks the button, the current list of items is
displayed. So, if the page looks like this:
How is it displayed? As an <ul>-list or as a <select>-element?
The latter is much easier to change.
-----------------
| tweeking | Add
-----------------

Current List
one
three

After Add
one
three
tweeking
Must the entries be alphabetic, or is that a coincidence?
I was thinking array, I think I will have to add it to an array and
then rewrite the array to the page.


If you can't remove elements from the list, then you don't need to
remember the elements. You can just add new elements after the ones
already there.

Sample code:
--- select element ---
<form action="...">
<input type="text" name="input">
<input type="button" value="Add"
onclick="this.form.elements['list'].add(
new Option(this.form.elements['input'].value),undefined);">
<br>
<select name="list" size="10">
</form>
---
or:
--- ul element ----
<form action="...">
<input type="text" name="input">
<input type="button" value="Add"
onclick="var li = document.createElement('li');
li.appendChild(document.createTextNode(
this.form.elements['input'].value));
document.getElementById('list').appendChild(li);">
</form>
<ul id="list">
</ul>
---

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: MooMaster | last post by:
I'm a complete beginner in Python, but I've been fooling around with Java for a couple years, so I have decent programming experience... Anyway, I was sitting around playing with Python, when I...
4
by: John Osborne | last post by:
I'm a beginner at this programming thing (C# and VB/VB.Net) but I have been given a task that I don't even knwo how to start to accomplish. I'm not asking anyone to write the code or anything,...
65
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
3
by: Jheitmuller | last post by:
Hi, I would like to convert a VB.NET application from being a Windows app to an ASP.NET app. I'm new to web development, so this may be a simple question. Is it possible to render simple drawing...
5
by: AManAfterGod | last post by:
OK, I'm fairly new to Java and I wanted to try if I could convert an easy Microsoft Excel problem into Java but I've hit a road block. I was wondering if one of you could point me in the right...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have an excel file that contains employee information. inside the workbook there are numerous worksheets - one per employee. is it possible to iterate thru the workbook reading pieces...
3
by: pjmulla | last post by:
I am nes to python and need some help. Can anyone lead me in the right direction to create and print a Point object, and then use id to print the object's unique identifier. Translate the...
6
by: chloejacobs | last post by:
Hi every1! My first post on Bytes :) I want to create a simple web page that will read of CSV file, sort the file by certain fields, take out duplicate entries if 3 fields have the same value...
2
by: Jajjo | last post by:
Hey all, First time posting here and just a simple question to begin with. I'm trying to create an iterator for a vector of POINT objects and for some reason, I'm getting this error: error...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.