Dropdown/Combo box

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
pekajo
 
 
Posts: 30
Joined: Wed Sep 19, 2018 12:35 am

Dropdown/Combo box

Post by pekajo »

Hi,
Does anyone know of a good combobox that runs from a text file and not 'hard coded' in Wysiwyg.
Thanks
Peter
User avatar
Pablo
 
Posts: 21571
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Dropdown/Combo box

Post by Pablo »

There is no standard solution for this, this will require a custom script.

For example (not tested, provided "AS IS"):

Code: Select all

var myArray;
var coords;
var showList;
$.ajax({
url: './contacts125.csv',
success: function(data)
{
var splitData=data.split("\n");

for (var i = 0; i < splitData.length; i++)
{
let str = splitData;
myArray = str.split(",");
showList = myArray[0] + ',' + myArray[2];

$('#Combobox1').append("<option value=\"" + showList + "\">" + showList + "</option>");
}
}
});
pekajo
 
 
Posts: 30
Joined: Wed Sep 19, 2018 12:35 am

Re: Dropdown/Combo box

Post by pekajo »

Hi,
Thanks for the reply.
I am not up on java, are you able to give me the code at the beginning and end to make this code complete so I can just insert into my page.
I really appreciate your help.
Peter
User avatar
Pablo
 
Posts: 21571
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Dropdown/Combo box

Post by Pablo »

Sorry, I cannot help you with custom code. For me, it may also take a lot of time to implement a complete working solution.
I have provided the code to point you in the right direction.
pekajo
 
 
Posts: 30
Joined: Wed Sep 19, 2018 12:35 am

Re: Dropdown/Combo box

Post by pekajo »

Cheers
Thanks anyway
Post Reply