I would like to be able to Stop the onclick event associated with clicking on the next button. So when a users presses on the next button.
Is it possible to hijack the on click event associated with clicking on the next button.
Thanks for all your help!
If you provide more information on what you are trying to accomplish, perhaps someone could help you.
Hide next button upon loading the page/ question
Respondent clicks on a specific link embedded on the question text
Next button is activated again.
Can this be done on Qualtrics using jquery? Also, does Qualtrics have any Python plugin?
Thanks!
```
var qobj = this;
qobj.hideNextButton();
jQuery("#myLinkId").click(function() { qobj.showNextButton(); });
```
You can use web based Python scripts through a survey flow web service call, an end of survey action, or from a jQuery ajax call.
Let's say I hyperlinked the element. So, I assign id to the link in the hyperlink or to the text?
Also, I just realized I don't know how to type a code without it getting executed. How are you using that grey box for posting codes?
> Unfortunately not working.
>
> Let's say I hyperlinked the element. So, I assign id to the link in the hyperlink or to the text?
>
> Also, I just realized I don't know how to type a code without it getting executed. How are you using that grey box for posting codes?
Post your code in back tick 'fences', like:
\\`\\`\\`
Code goes here
\\`\\`\\`
Add the id to your `<a>` tag:
```
<a id="myLinkId" href="https://myurl.com">Link text</a>
```
Thank you so much!
Hi,
TomG
the code above works, thanks a lot!
var qobj = this;
qobj.hideNextButton();
jQuery("#myLinkId").click(function() { qobj.showNextButton(); });
But I have a question, can I use the same code to force the participants to click two items (in my case buttons), before the next button appears?
So in the case aboe, something like:
jQuery("#myLinkId1"&"#myLinkId1") ....
Or do I need to use another structe (e.g. with on("click"))?
Many thanks
Robin
https://community.qualtrics.com/XMcommunity/discussion/comment/42935#Comment_42935No, you can't use the same code. You'll need to keep track of which links have been clicked:
var qobj = this;
qobj.hideNextButton();
var link1 = false, link2 = link1;
jQuery("#myLink1").click(function() {
link1 = true;
if(link1 && link2) qobj.showNextButton();
});
jQuery("#myLink2").click(function() {
link2 = true;
if(link1 && link2) qobj.showNextButton();
});
TomG works like a charm. Thanks a lot and a good weekend!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.