したがって、以下のJavaScriptコードは、自動マーケティングソフトウェアEloquaからデータを取得するために使用しているものです。これは、単一選択のドロップダウンで機能します。私がやりたいのは、複数選択のドロップダウンの作業です。
ProductValue変数が機能することを知っています。つまり、これはドロップダウンで値を呼び出しているため、if(ProductValue == ProductList [i] .value)、具体的には「.value」に含まれていることを確信しています。これを複数にする方法はありますか?これは何日も私を狂わせてきました。
function CustomerInformation()
{
var ProductValue = "<span class=eloquaemail>MarketingCustomerInformation1</span>"; //Field Merge...Field merge is working
var ProductList = document.getElementById('C_Marketing_Customer_Information1').options; //Calling the contact record field
for(var i=0; i< ProductList.length; i++)
{
if(ProductValue == ProductList[i].value)
{
document.getElementById('C_Marketing_Customer_Information1').value = ProductValue;
break;
}
else
{
document.getElementById('C_Marketing_Customer_Information1').value = "Select";
}
}
}