0

I populated the dropdown with the help of array. for example I have array with elements (ali,abid,naqvi).

Problem.....

when I clear the cache and reload the page. and first time I am unable to select first value which is "ali". but if after cache clear and page reload, I select "abid" or "naqvi" first time and then select "ali" it work fine.

in short...after page reload I cann't select first value of dropdown unless I select other values first.

asked Feb 12, 2021 at 13:09
2
  • Sharing your code would be better than explaining. please share Commented Feb 12, 2021 at 13:41
  • yeah you are right bro. but I got the answer Commented Feb 15, 2021 at 7:16

1 Answer 1

0

Actually problem was that I was using "onchange" function. When I used "onclick" it was working fine and also select the first value from drop too.like I was using

$('.pro_size').on('change', function(event){

after modification

$('.pro_size').on('click', function(event){ =>worked fine

answered Feb 15, 2021 at 7:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.