View Single Post
Old 01-08-2006, 10:11 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
Quote:
Originally Posted by Rotkiv
my question: can the names of the new textboxes be seen by php's $HTTP_SERVER_VARS thingy? I need to know just so i know if my php code is bad, or if it just won't work with my javascript.

to see the javascript it's list.js in the same folder.
thnx
PHP doesn't see anything until you press the submit button. Once you press submit, if you have created an 'name' attribute for that element, then you would be able to access that variable with: $_POST['myvarname']

Using javascript for this might be a little more complicated than you need it to be. If I were saving names in an XML file, I would use this logic:

- read the xml file into an array
- display the names in the file on the page
- at the top or bottom of the page, have a text box and submit button to add a new name
- write a function to add a new name to the xml file if one is submitted
- also write a function to delete a name from the xml file and have a 'delete' link next to the name to trigger it

i really don't know the scope of your project and this may completely not apply to it, .. but definately get a handle on the PHP/XML stuff you want to do before you get too deep into the javascript.
sde is offline   Reply With Quote