- Posts: 169
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
how to locate url after click button?
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
9 years 10 months ago #109478
by iscar
how to locate url after click button? was created by iscar
version2.0.when user click button, will go to next question.
in a particular question, i would like user to a url instead of next question.
i add jquery as:
but it still go to next question.
i think it's because
is onclick should be prior to click()?
how to locate url instead of next question?
in a particular question, i would like user to a url instead of next question.
i add jquery as:
Code:
$('#movenextbtn').click(function(){window.location.href="http://www.example.com"});
but it still go to next question.
i think it's because
Code:
<button class='submit' type='submit' onclick="javascript:document.limesurvey.move.value = 'movenext';
how to locate url instead of next question?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
9 years 10 months ago - 9 years 10 months ago #109487
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic how to locate url after click button?
Hi,
Tested in 200.sondages.pro/index.php/survey/index/...31/newtest/Y/lang/en
Tested in 200.sondages.pro/index.php/survey/index/...31/newtest/Y/lang/en
Code:
<script> $(document).ready(function () { $("#movenextbtn").click(function(e){ if($("#answer{SGQ}").val()==""){ e.preventDefault(); window.location.href="http://example.com"; }else{ // Do something other, here : default } }); }); </script>
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 9 years 10 months ago by DenisChenu. Reason: {SQG} to {SGQ}
The following user(s) said Thank You: iscar
The topic has been locked.
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 169
- Thank you received: 0
9 years 10 months ago #109489
by iscar
Replied by iscar on topic how to locate url after click button?
when i input something, it still goto example.com
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
9 years 10 months ago #109490
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic how to locate url after click button?
Youre rigth: SGQ and not SQG .....
Corrected the link : 200.sondages.pro/index.php/survey/index/...31/newtest/Y/lang/en
With the newtest/Y to anwer to another question (be sure to have the las Expression Manager)
Corrected the link : 200.sondages.pro/index.php/survey/index/...31/newtest/Y/lang/en
With the newtest/Y to anwer to another question (be sure to have the las Expression Manager)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- surveyman
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
9 years 2 months ago #117155
by surveyman
Replied by surveyman on topic how to locate url after click button?
Interesting script. I was looking for something like this. Did you just copy/paste the script into the question or question group?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13648
- Thank you received: 2491
9 years 2 months ago #117157
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic how to locate url after click button?
In question text or help.
Using SGQ then in question text.
Using SGQ then in question text.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: surveyman
The topic has been locked.