Link to home
Start Free TrialLog in
Avatar of Mark Drelinger
Mark DrelingerFlag for United States of America

asked on

Ed vbscript to append value from a fiel

I have a VBScript that I don't understand very well and I need to edit it to append another field to it's result.
The final result of varToEmails needs to include the value of field TeamAlerts. I don't know where to insert it into the code.

function getVarToEmails()
{
   var itm = "";
   for(var i = 0; i < document.form.varTo.options.length; i++)
   
   {
      if (document.form.varTo.options[i].selected)
         itm += "; " + document.form.varTo.options[i].text; // or .text, depending
   } 
   if (itm != "")
      itm = itm.substr(1);
	  	document.form.varToEmails.value = itm
   return itm;
}

Open in new window

Avatar of Bill Prew
Bill Prew

This doesn't look like VBScript, can you tell us more about where this code exists, and what type of project it is part of?


»bp
Avatar of Mark Drelinger

ASKER

You are correct. It is JavaScript within an .asp page. Top of .asp page showed '<%@LANGUAGE="VBSCRIPT"%>' so I thought it was vbscript.

I will repost under correct topic.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial