Click to See Complete Forum and Search --> : Using Textarea Instead of Typical WebForm


cba321
09-09-2005, 02:29 AM
Hi,

Is there any way to insert data into database if user copy and paste a set of data into a single textarea rather than have to key in the item one by one in input boxes?

The set of data is copied from a HTML table from another website. The set of data is quite long with multiple product number, description, qty, and location so it is quite troublesome for user to key in one by one.

It is kind of like a mass data entry

Thanks

bathurst_guy
09-09-2005, 02:42 AM
well what seperates each entry, you can do like an explode by spaces or commas or anything (if they are copying in the code itself you can explode via </td><tr>) it all depends on the input (although the input would need to be consistent), then maybe a loop to format into the number, desc qty location etc and then i would display it back to them so they can check its correct before entering into the db

bathurst_guy
09-09-2005, 02:44 AM
woops sorry thought it was php but its asp, similar idea though

cba321
09-09-2005, 04:48 AM
user copy directly from html table (browser) and paste on textarea. do you have any code that can help me to differentiate those data? for eg, after paste will look something like this: product description location qty

prod1 description of prod1 location1 8
prod2 descripton of prod2 7
prod3 location3 10
prod4 description of prod4 location4 6

Each row of data will be on new line....Then each column of data will be 1 space away from each other except for "Description" because it may have spaces in a sentence.

does anyone know how to differentiate those data and INSERT INTO database?