Start a new topic

QuoteValet Custom Template

I am emailing you with hopes that you can help me or direct me to the right person that can.
I have a client that is creating a custom QuoteValet template and they have asked me to write a JS/Jquery function to calculate the total of 2 drop down lists and display the total in a field. I have the custom JS/JQuery function working on my end in a .html file, but when we upload the same JS/JQuery and HTML for the 2 drop down lists and field into the template, it generates a NaN value instead of the correct calculated value.
I have inspected the code and even written the values to the console and it appears as though the select values from the drop down lists are not being selected.
This is what one of the select lists looks like from the generated QuoteValet template.. notice the last option in the list.. has no set value and is selected by default... it appears as this is what the JQUERY is returning as the selected value, vs what is actually selected.

Here is my JS/Jquery

cameras = parseInt($(".DH_Customtext21 option:selected").val());
console.log(cameras); //returns undefined

<select  name="DH_Customtext21" id="DH_Customtext21">
  < option value="3">3</option>
  < option value="7">7</option>
  < option value="30">30</option>
  < option value="60">60</option>
  <option  selected="selected" value></option>
  </ select>

______________________________________________________

Jay Dymond
First Direct Corp.
Helping You to Market, Sell and Service Better
www.1stdirect.com
www.GoldMineSuccess.com


1 Comment

Maybe using the "InputType=DropDownList" macro attribute approach might make a difference?


[DH_CustomText21:InputType=DropDownList,ListItems=3;7;30;60]


Also: I notice that you have lower case "T" in CustomText21. I don't know if this might be case-sensetive and so perhaps go with CustomText21 instead of Customtext21.

Login or Signup to post a comment