0

I know this question is already asked, but my problem is different. I have a code field created with Display Suite, that displays an audio player named AblePlayer, with a playlist of three tracks. In this field there is a list of buttons that select tracks to play. The list is created dynamically with foreach, depends on field items. When button is clicked, AblePlayer selects automatically the track and plays it.

The problem is that drupal refreshes the page and Player stops playing!

I'm using html to create these buttons, don't use arrays.

I tried to create a button that does nothing, to see if the problem is AblePlayer, but drupal refreshes the page also if button is simply a button…

so <button>something</button> does nothing, but drupal refreshes the page! Help!

  • Are you required to use the button element? If not, just use a div or span. – enzipher Oct 22 '19 at 18:07
  • Unfortunately, is the same with <div> also! It's incredible, drupal refreshes the page! – Germano Carella Oct 25 '19 at 9:49
  • If that's the case it sounds like there is a javascript that do the submit/refresh. It's difficult to say what's going on without having the complete picture. Try to comment out different parts to find out what may be causing it. – enzipher Oct 25 '19 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.