hi guys, I've been following the tuts and help on this incredible site for a while and must say that you guys are really amazing and very helpful.
I am learning PHP since it's very useful for site development etc.
I will appreciate any help form you guys on a little project I'm trying my hands on.
I have a flat file data base that i read email addresses from into data table(TD) with check boxes attached to each data.
Is there a way that when a check box is checked it automatically adds that data separated by coma( in to a text box one at a time? and if it's unchecked it removes it from the text box.
Thanks for any assistance.
my php code for retrieving data looks like this..
echo"<input type=\"checkbox\" name =\"confirm[$k]\" value=\"{$data[$k][0]}\" />";
Set up js listener to check for 'confirm' check events. This will append the value of the checkbox to the textbox text. E.g. for all browsers other than IE (need attachEvent for that).
thanks ardav,
your code did add a check box quite ok, but what I was hoping to do is have a blank text box bellow, that will append if the any one in the table TD is checked.
Pls bear with me, I hope I'm not asking for too much, since I'm still learning. about the js can you give me a pointer? thanks again.
I understood your post, I just didn't want to do all the work for you. You can add the 'value' (e-mail address) of the checked checkbox to the textbox.
Pls help,
Thank you, I'm very sure you know what I want to get at. But you want me to learn, thanks.. after trying to implement your code tis is what i have so far..
What I willl want to achieve is whem a check box is clicked the value corresponding to that checkbox +":" displayed in the textbox above, and when a checkbox is unchecked that value removed from the list. pls pls any help is well appretiated. thanks..
my code
I know with ja like
ardav You are the best,
Like you said its different.. but that work like a charm. I'm very happy with it, only I have to Find a way to make it read dynamically from my txt file. instead of predefining the input Array. I hope I can use jquery with php.
Thanks so much
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.