convert a vb.net script into Javascript code

I have a script that reads some values to create a string that I can pass into a query string. The VB code works but I want it in Javascript. See the attached file. There are two loops one for the authors names and the other for affiliations. The code MUST end up with the correct amount of brackets "(" + " )"

Acordat lui:

Hello! While my Javascript skill level is only intermediate, I have more than 6 years experience in C, C++, C#, VB.NET, etc, and the same programming principles generally apply to Javascript too, specially when it comeMai multe

8 freelanceri licitează în medie 26$ pentru acest proiect

Hi,
Firstly, Thank you for reviewing my proposal. I have gone through your requirements and came to know that you need an expert web developer to build your website. I have strong knowledge and 3+ years experience iMai multe

Hi,
Nice to meet you. I have many year's experience in ASP/VBScript, HTML, Javascript/Jquery, CSS, MSAccess, MS SQL server,...
I dont know that have you resolved your issue already?
Hope I can help you to coMai multe

ok my friend, as a matter of fact i already made your function but there are 2 key things to note:
1st. you dont really have the form parts at hand in JavaScript, you can use jquery or DOM navigation to get em but Mai multe