473,657 Members | 2,544 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(v al)
{
var phil = parseInt(val);
document.write( "<table border=\'0\' width=\'100%\' id=\'table1\'
cellspacing=\'0 \' cellpadding=\'0 \' bgcolor=\'#FFE1 FF\'>");
for (i=1;i<=phil;i+ +)
{
this.document.w rite("<TR><TD width=\'200\'>B ox 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="SaveResult s" U-File="D:\Projec ts\City Car
Club\_private\f orm_results.csv " S-Format="TEXT/CSV"
S-Label-Fields="TRUE" -->
<p>&nbsp;</p>
<p>Is your partner a member? <select size="1" name="Partner_L ist"
onchange="Check DropDown(this.v alue);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">5 0000</option>
</select></p>
<p>&nbsp;</p>
</form>
</body>

Oct 13 '05 #1
1 1233

<go****@budge t-edi.co.uk> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.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(v al)
{
var phil = parseInt(val);
document.write( "<table border=\'0\' width=\'100%\' id=\'table1\'
cellspacing=\'0 \' cellpadding=\'0 \' bgcolor=\'#FFE1 FF\'>");
for (i=1;i<=phil;i+ +)
{
this.document.w rite("<TR><TD width=\'200\'>B ox 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="SaveResult s" U-File="D:\Projec ts\City Car
Club\_private\f orm_results.csv " S-Format="TEXT/CSV"
S-Label-Fields="TRUE" -->
<p>&nbsp;</p>
<p>Is your partner a member? <select size="1" name="Partner_L ist"
onchange="Check DropDown(this.v alue);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">5 0000</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
2312
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. I am a real beginner in programming. I am making a baking recipe site. For each section, say cookies, I will have around 100 recipes, which will be named sequentially, 001.html - 100.html for example.
4
2232
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 MYSQL table. I read these using PHP and the result is an array if you will of each of the 'lines' or records that the user wants displayed in the scroller. $msgctr is an integer that is the total number of records passed by PHP
9
2109
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 and Safari, but in the latest FireFox I get no title or article, but do see the prev and next links and the article number. My HTML and JS simple routine is as follows:
6
2756
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 : MATHEMATICS HISTORY GEOMETRY once you click on one of these a submenu would appear
27
4607
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 = $doc->loadHTMLFile("./aBasicSearchResult.html"); if ( $res == true ) { $zip = $doc->getElementById('zipRaw_id')->value; if ( 0 != $zip ) {
4
1326
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
6320
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 have on his site, a Javascript Calculator for working out the cost of what they want, for example: 1 widget and 2 widglets = £5.00
13
2033
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 folks might find to taste. Here's the code - first the 'engine', then some code demonstrating the usage patterns. For me (and maybe for some of you), it promotes readability and some
4
1488
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 please tell me what I have done wrong? I have pasted the code in below. Thank you.
7
2440
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 acquried (and modified) some javascript code, but it did not work... So I attempted to create a simple alert() function to test and that did not work either... This is my test codee: // tooltip.js function displayAlert() { alert("Test...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7324
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.