Forums
This topic is locked
Javascript Array
Posted 30 Nov 2005 08:27:21
1
has voted
30 Nov 2005 08:27:21 Aaron Smith posted:
I have a form that submits to a Access db. I have a field in the form that submits email addresses that are sperated by commas - any chance on some help to split the comma sperated emails into seperate records in the db? Form Page is asp javascript. Replies
Replied 02 Dec 2005 11:23:58
02 Dec 2005 11:23:58 richard fuller replied:
why use javascript? Just use a split in vbscript
It works like this
say you start with a form item called emails
, ,
Once you submit the form before putting the data in the database
emailArray = split(request("emails",","
you end up with this
you can call each using emailArray(0), emailArray(1), emailArray(2)
or when submiting the data
for i = 0 to 2
emailArray(i)
next 'i
Regards
Richard
It works like this
say you start with a form item called emails
, ,
Once you submit the form before putting the data in the database
emailArray = split(request("emails",","
you end up with this
you can call each using emailArray(0), emailArray(1), emailArray(2)
or when submiting the data
for i = 0 to 2
emailArray(i)
next 'i
Regards
Richard
Replied 03 Dec 2005 18:42:09
03 Dec 2005 18:42:09 Aaron Smith replied:
Thanks Richard. I'll see if I can make it happen.
Aaron
Aaron