Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

change link for next button

  • honorem
  • honorem's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 6 months ago #134951 by honorem
change link for next button was created by honorem
Why is my simple javascript for my move next button failing (i still move to the next page)? putting the following into a groups source for description box:
Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function(){  
    $('#movenextbtn').click(function(){window.location.href="https://example.com"})
  });
</script>

Javascript is indeed enabled, I've tried with a simple alert which works fine.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
8 years 6 months ago #134985 by DenisChenu
Replied by DenisChenu on topic change link for next button
Hi ,

First : { is EM system, then add a space after. This was in manual and i put space on IRC.
Second : always deactivate default by security
Code:
<script type="text/javascript" charset="utf-8">    
  $(document).ready(function(){  
    $('#movenextbtn').click(function(event){ 
                       event.preventDefault()
                       window.location.href="https://example.com";
                  })
  });
</script>

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose