Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Added custom code bootstrap multiselect dropdown which automatically adds some function text.


VikramShetty_73bit

Question

I have implemented a bootstrap multiselect dropdown and there are some weird code added at the bottom of the list as displayed in the screenshot below. You can look at a screen grab of the same attached.
 
The drop down loads rest of the values correctly but adds up this code in the end. 
 
The html of the drop looks like this
<div class="dropdown bootstrap-select show-tick chart">
  <select multiple="" class="selectpicker chart" index="0" chart_name="Overall_Score" tabindex="-98">
    <option value="Good Value" selected="">Good text</option>
    <option value="Good Value2" selected="">Good text2</option>
    <option value="function(e,t){return this.splice(e,!t||1+t-e+(!(t<0^0<=e)&amp;&amp;(t<0||-1)*this.length)),this.length}" selected="">function(e,t){return this.splice(e,!t||1+t-e+(!(t&lt;0^0&lt;=e)&amp;&amp;(t&lt;0||-1)*this.length)),this.length}</option>
    <option value="function(e){this.removeRange(e,e)}" selected="">function(e){this.removeRange(e,e)}</option>
    <option value="function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return void this.removeAt(t)}" selected="">function(e){for(var t=0;t</option>    <option value="function(){for(var e=[];this.length;)e.push(this.splice(Math.random()*this.length,1));for(;e.length;)this.push(e.pop()[0]);return this}" selected="">function(){for(var e=[];this.length;)e.push(this.splice(Math.random()*this.length,1));for(;e.length;)this.push(e.pop()[0]);return this}</option>
    <option value="function(e){return-1<this.indexOf(e)}" selected="">function(e){return-1</option>
 </select>
</div>

 

If anyone know how to fix this issue please let me know. 
 

unnamed.png

Link to post
  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

3 answers to this question

Recommended Posts

  • 0

I can definitely see the problem with the HTML code but I'm not really too sure what you're trying to achieve. Would you be able to provide some more context or a link to your website or an example of what you're trying to achieve? 

If you see an answer that was helpful please consider hitting the 121238226_Screenshot2019-11-02at14_53_39.png.0416997a5e856e0159fa1edbd624659e.png button on the right. 

Need help with your website or online store? Feel free to get in touch.

thompsonweb.design

Link to post
  • 0

Agreed. More context would help. In general though, inserting JavaScript code in the "value" attribute will simply result in the code you write being shown as the option. What you're seeing is just that: the lines of JavaScript you've inserted in each "value" attribute listed as options in the select element.

If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' vote.jpg.c260784ece77aec852b0e3049c77a607.jpg (top-left)

Link to post
  • 0
13 hours ago, VikramShetty_73bit said:
I have implemented a bootstrap multiselect dropdown and there are some weird code added at the bottom of the list as displayed in the screenshot below. You can look at a screen grab of the same attached.
 
The drop down loads rest of the values correctly but adds up this code in the end. 
 
The html of the drop looks like this

<div class="dropdown bootstrap-select show-tick chart">
  <select multiple="" class="selectpicker chart" index="0" chart_name="Overall_Score" tabindex="-98">
    <option value="Good Value" selected="">Good text</option>
    <option value="Good Value2" selected="">Good text2</option>
    <option value="function(e,t){return this.splice(e,!t||1+t-e+(!(t<0^0<=e)&amp;&amp;(t<0||-1)*this.length)),this.length}" selected="">function(e,t){return this.splice(e,!t||1+t-e+(!(t&lt;0^0&lt;=e)&amp;&amp;(t&lt;0||-1)*this.length)),this.length}</option>
    <option value="function(e){this.removeRange(e,e)}" selected="">function(e){this.removeRange(e,e)}</option>
    <option value="function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return void this.removeAt(t)}" selected="">function(e){for(var t=0;t</option>    <option value="function(){for(var e=[];this.length;)e.push(this.splice(Math.random()*this.length,1));for(;e.length;)this.push(e.pop()[0]);return this}" selected="">function(){for(var e=[];this.length;)e.push(this.splice(Math.random()*this.length,1));for(;e.length;)this.push(e.pop()[0]);return this}</option>
    <option value="function(e){return-1<this.indexOf(e)}" selected="">function(e){return-1</option>
 </select>
</div>

 

If anyone know how to fix this issue please let me know. 
 

unnamed.png

I am sorry that the question wasn't clear.

We think we have found the issue. It is somehow added in our custom code. We are investigating it further. So squarespace could not be an issue

Thank you for your help. 

Edited by VikramShetty_73bit
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...