Random Dropdown menu selection - How?

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
Hello,

I am having a bit of a nightmare there,I can select a dropdown menu and use the keyboard emulation for down and up the selection but I cannot work out how to down and up the selection at random stroke because I do not always want the same category to be picked up.

Any idea how to do this please?

Thank you,

Ben
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
What html element?
Standard select?
Any link to page?
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
You should set random number () in dropdown menu selection action (Data>Random>Number - range from 0 to number of dropdown menu items).
 

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
I am very sorry but it is a website still on development, I am trying to use zenno to fill up the site with data to optimize it's database.

Here is the code:
<option value="">Select a deal category</option>
<option value="30">Beauty</option>
<option value="18">Electronics</option>
<option value="34">Fitness</option>
<option value="26">Food</option>
<option value="46">Health</option>
<option value="22">Hotels &amp; Spa</option>
<option value="47">Industrial</option>
<option value="6">laptops</option>
<option value="10">mobiles</option>
<option value="38">Restaurant</option>
<option value="42">Take away</option>

I would like to sometime have any of those categories to be picked up please.

Thanks,

Ben
 

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
Yes I tried this:
"You should set random number () in dropdown menu selection action (Data>Random>Number - range from 0 to number of dropdown menu items)."

But then where do I paste this variable? As the dropdown has to be clicked first then move.

Thanks,

Ben
 

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
I actually created a list of numbers rather than random as you can see the numbers cannot be random.
 

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Благодарностей
21
Баллы
18
ok I have done it.....
I entered all the drop down names into a variable, set this as random.
Then set the html attribute to the variable, it works well.

Thank you again for your help!

Ben
 
  • Спасибо
Реакции: Jangoz и VladZen

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)