Javascript array in GET

U

UKuser

Hi,

I have a form which is created with PHP and has each input/text box as
a name[num].

What I want is to use ajax to send each the contents of the boxes in a
get statement as if it were a PHP post or get statement.

I.e.
<input type="text" name="prop[1]" value="eds" style="width:150px" />
<input type="text" name="prop[2]" value="eds" style="width:150px" />
<input type="text" name="prop[3]" value="n4" style="width:150px" />

I want my javascript to get the contents of each of the boxes and post
it to my php script from where I can process it. It will be passed to
the php script as a GET statement.

I am trying to use the getElement/s lines, but I am not a javascript
guru and struggling a bit.

Any help would be great.

Thanks

A
 
T

Thomas 'PointedEars' Lahn

Randy said:
David Mark said the following on 7/18/2007 10:33 AM:
UKuser said:
<input type="text" name="prop[1]" value="eds" style="width:150px" />
<input type="text" name="prop[2]" value="eds" style="width:150px" />
<input type="text" name="prop[3]" value="n4" style="width:150px" />
Those are not valid names for a start.

[...] Oh wait, you are falling back on the XHTML sword where they
are invalid. [...]

Not at all.

,-<http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
|-<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
|-<http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd>
|
| <!ATTLIST input
| %attrs;
| %focus;
| type %InputType; "text"
| name CDATA #IMPLIED
| [...]

,-<http://www.w3.org/TR/2006/WD-xhtml-modularization-20060705/dtd_module_defs.html#sec_F.3.4.>
|
| <!ENTITY % input.qname "input" >
| [...]
| <!ATTLIST %input.qname;
| %Common.attrib;
| type %InputType.class; 'text'
| name CDATA #IMPLIED
| [...]


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top