Welcome to the LimeSurvey Community Forum

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

change link for next button

More
9 years 4 months ago #134951 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.
More
9 years 4 months ago #134985 by DenisChenu
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