How to enter values in the textarea from CSV

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

How to enter values in the textarea from CSV

by JagadeeshK on Fri Jan 22, 2016 1:57 am

Hi,

I'm using iMacros V11 in FF 43.0.2. I'm using javascript for doing some validations. I'm trying to enter (input) values in the text area field.

I used the hardcoded value like below, and it worked without any issues.

Code: Select all
iimPlay("CODE:TAG POS=1 TYPE=TEXTAREA FORM=ID:updateproducts ATTR=ID:gift-message-*-message CONTENT=Test<SP>Text<SP>test");


So, for the same field, I want to get the(input) data from the csv file, and I tried the below code

Code: Select all
iimPlay("CODE:TAG POS=1 TYPE=TEXTAREA FORM=ID:updateproducts ATTR=ID:gift-message-*-message CONTENT="+spl[11]);


trying to enter data from the 11th column .The above mentioned code is not working, it's not entering the data into the textarea field.

Code: Select all
iimDisplay (spl[11]);
-- This displays the value in the 11th column without any issues.

if the 11th column is having only a single string (for example "test"), this code
Code: Select all
iimPlay("CODE:TAG POS=1 TYPE=TEXTAREA FORM=ID:updateproducts ATTR=ID:gift-message-*-message CONTENT="+spl[11]);
is working perfectly. But when the 11th column contains a value like "test test", the above code is not working. Which means that it's not accepting the words, that has spaces in between. Please help me on resolving this, also plz let me know if you need more details

Thanks,
Jagadeesh.K
JagadeeshK
 
Posts: 8
Joined: Tue Jan 05, 2016 8:41 am

Re: How to enter values in the textarea from CSV

by JagadeeshK on Fri Jan 22, 2016 6:42 am

I found a way to make it work. Just need to replace all the blank spaces with the <SP>tag.

Code: Select all
var tmpstr = spl[11].replace(/ /g,'<SP>');
iimPlay("CODE:TAG POS=1 TYPE=TEXTAREA FORM=ID:updateproducts ATTR=ID:gift-message-*-message CONTENT="+tmpstr);


If someone know a better/simple way to fix this, plz share that.

Thanks,
Jagadeesh.K
JagadeeshK
 
Posts: 8
Joined: Tue Jan 05, 2016 8:41 am


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 4 guests

-->