473,503 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Javascript Array

We need to post the contents of textboxes to a php file as an array.
Does anyone know how to do it?

Cheers
Phil.

Heres the code (which works, but doesnt post to into an array)

<head>
<script type="text/javascript">
function CheckDropDown(val)
{
var phil = parseInt(val);
document.write("<table border=\'0\' width=\'100%\' id=\'table1\'
cellspacing=\'0\' cellpadding=\'0\' bgcolor=\'#FFE1FF\'>");
for (i=1;i<=phil;i++)
{
this.document.write("<TR><TD width=\'200\'>Box No: " + i +
"</td><td><input type=\'text\' name=\'Box"+i+"\'
size=\'20\'></td></tr>");
}
document.write("</table>");
}
</script>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--" name="form1">
<!--webbot bot="SaveResults" U-File="D:\Projects\City Car
Club\_private\form_results.csv" S-Format="TEXT/CSV"
S-Label-Fields="TRUE" -->
<p>&nbsp;</p>
<p>Is your partner a member? <select size="1" name="Partner_List"
onchange="CheckDropDown(this.value);return false">
<option selected value="please select">please select</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="50000">50000</option>
</select></p>
<p>&nbsp;</p>
</form>
</body>

Oct 13 '05 #1
1 1220

<go****@budget-edi.co.uk> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
We need to post the contents of textboxes to a php file as an array.
Does anyone know how to do it?

Cheers
Phil.

Heres the code (which works, but doesnt post to into an array)

<head>
<script type="text/javascript">
function CheckDropDown(val)
{
var phil = parseInt(val);
document.write("<table border=\'0\' width=\'100%\' id=\'table1\'
cellspacing=\'0\' cellpadding=\'0\' bgcolor=\'#FFE1FF\'>");
for (i=1;i<=phil;i++)
{
this.document.write("<TR><TD width=\'200\'>Box No: " + i +
"</td><td><input type=\'text\' name=\'Box"+i+"\'
size=\'20\'></td></tr>");
}
document.write("</table>");
}
</script>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--" name="form1">
<!--webbot bot="SaveResults" U-File="D:\Projects\City Car
Club\_private\form_results.csv" S-Format="TEXT/CSV"
S-Label-Fields="TRUE" -->
<p>&nbsp;</p>
<p>Is your partner a member? <select size="1" name="Partner_List"
onchange="CheckDropDown(this.value);return false">
<option selected value="please select">please select</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="50000">50000</option>
</select></p>
<p>&nbsp;</p>
</form>
</body>
you dont have a text box on this page just one dropdown which will give you
one value, hardly worth creating and array for this !!

Oct 13 '05 #2

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

Similar topics

3
2297
by: Alan Clark | last post by:
Dear All I need to do something very simple with Javascript and have been looking all over the web for two days for a suitable script. I'm the kind of person who learns by seeing how it's done....
4
2216
by: Owen Parker | last post by:
Hi all I am not a java programmer but i can hack at it a bit. I am trying to allow a user to define the text in a simple javascript text scroller. The data is stored as multiple records in a...
9
2092
by: Astra | last post by:
Hi everybody Wonder if you could help me out. I created a simple JavaScript routine to enable a user to click backwards and forwards between small news articles. This routine works fine in IE...
6
2745
by: Sergio | last post by:
for my web site I am looking for a simple PHP plain text menu system, the menu would have at least four levels and about 200 links, at starting only the main levels should appear, for example : ...
27
4583
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
4
1314
by: bmgz | last post by:
I have a simple DHTML gallery: <script> viewPhoto(thumb){ function viewPhoto(thumb){ document.getElementById('mainPhoto').src=thumb.href; return false; } </script>
24
6285
by: firstcustomer | last post by:
Hi, Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that someone will be able to point me to a ready-made solution to my problem! A friend of mine (honest!) is wanting to...
13
2011
by: aum | last post by:
Hi, I'm a Python programmer, just starting to get into javascript. On reading some of the js guides, and not liking any of the OO usage patterns I saw, I've cooked up something which python...
4
1479
by: paul.denlinger | last post by:
Please excuse this very basic question; I'm just starting to learn JavaScript. I have just modified added a toUpperCase statement to change strings to upper case, but it does not run. Can you...
7
2432
by: freddukes | last post by:
Okay... So this is my first project and I want to be able to make a tool tip appear with the basket contents whenever you hover over a link using the onmousehover='javascriptFunction()'. I have...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.