I'm having trouble inserting a vertical line between the second to last radio button and the last one. Basically to separate the last choice in the likert scale and the "i don't know" option. Can anyone else help please?
Heres's what I want to do
Here's a code I found to hide a radio button (another option I am open to to hide a radio button between the two choice to create "whitespace")
$('QR~QID154~198').up().hide();
It didn't seem to work...maybe I have to specify which answer choice? Any advice can help as I am not a programmer at all. It's just Qualtrics doesn't have the feature to do that. Thanks!
Use the following. You can adjust the style to meet your needs.
Qualtrics.SurveyEngine.addOnload(function() {
$(this.questionId).down('.ChoiceStructure').select('td').last().style.borderLeft = "3px solid grey";
});
P.S. Are you the person who left a comment on the marketinview/Qualtrics_MatrixVerticalLineBeforeLastColumn.js gist a couple of days ago? I don't get notified nor check comments there.
Related
I know that the title of asking is quite vague. But let's check this page:
https://www.cleaneye.go.kr/user/gongsiCompare.do
So this is one of public data page in Korea which has a data I need in my research.
As you can see, it has some checkbox in ul, and if you check one of the box in left one, the list of checkbox on its right would come up.
So I made a code to check every combinations, and I'll show you the one which cause the problem.
from selenium import webdriver
driver = webdriver.Chrome(CHROMEDRIVER_LOCATION)
driver.get('https://www.cleaneye.go.kr/user/gongsiCompare.do')
in_type = driver.find_elements_by_xpath("//div[#id='divPcomp']/ul/li")
for in_t in in_type:
in_t.find_element_by_xpath("./label/input").click()
region_type = driver.find_elements_by_xpath("//div[#id='divSido']/ul/li")
for r_t in region_type:
r_t.find_element_by_xpath("./label/input").click()
The problem is, when the code execute
r_t.find_element_by_xpath("./label/input").click()
it gives ElementNotInteractableException error, maybe cuz DOM didn't revised after it clicked the checkbox in
in_t.find_element_by_xpath("./label/input").click()
So I've searched how to solve this problem, and most of answers were about using implicit/explicit wait. Before I do that, I put time.wait(30) between click()s, and still it didn't work. So just waiting might not be the solution for this.
As you can see, if you refresh it, the whole page would be reset so... that is not the answer for this as well.
Is there any great solution, or any walk-around it, please enlighten me.
Otherwise, I'll just use mouseclick and keyboard inputting 'tab' haha...
Thanks for your attention to this problem!
your locator is not unique, it finds element that is not visible on screen use :
region_type = driver.find_elements_by_xpath("//div[#id='divSido']/ul/li[#class='rowon']")
I am trying to hide the fourth option of a question in a loop and merge if one of the loop and merge fields refers to a certain name. here is the code i am using at the moment:
Qualtrics.SurveyEngine.addOnload(function()
{
if("${lm://Field/2}"=="76ers"){
$('QR~${lm://CurrentLoopNumber}_QID27~4').hide();
}
});
the idea is, if Field/2 is "76ers", then it should hide the fourth option of this question. I am very new to using java in qualtrics so there is a lot that could be going wrong here. The loop is randomized, and field 2 refers to an embedded data field which at some point will refer to the 76ers. I want to hide the fourth choice option when it does that - but no joy with the code I am using.
In case it helps, I attach the screen where I want is for the fourth option down to be hidden.
enter image description here
Please let me know if anyone has a solution!
Many thanks,
Josh
I have a JS file that has over 100000 lines of code, I want to get rid of the first 25000, I've been trying hard but can't figure out how do I select them all at once (holding left mouse button and scrolling down is not an option as it would take forever).
I guess holding SHIFT and arrow DOWN is the way to go, but I have absolutely no idea how to select them all at once anyway. Maybe selecting 25000th line, pressing shift, left arrow and then HOME would help, but I'm working on OS X and have no HOME button my Macbook. Also shortcut for "going to line" (ctrl+q) doesn't seem to work with selection.
How do I do that? Sorry for so dumb question, would've been a second in VIM, but I'm stuck to SE2 now.
Thanks a lot!
go to line 25000: CMD+L, enter 25000
hit CMD+SHIFT+UP ARROW
done
See this forum topic about the "Mark" feature from Sublime Text: https://www.sublimetext.com/forum/viewtopic.php?f=2&t=16844
Ctrl-G to go to the last line you want to select, by number.
Edit > Mark > Set Mark to set your selection-end marker.
Ctrl-G (or Ctrl-Home) to go to the first line you want to select.
Edit > Mark > Select to Mark
Any programming language will do, for example in python:
lines = open('yourfile.txt','r').readlines()
open('yourfile.txt','w').write(lines[24999:100000])
Trying to build a guestbook with some jQuery features..
Now when im clicking at the "Post"box it appears a new box with the name "MenuBox" (This box is always hidden) i got the toggle part to work ALMOST.
The meaning of the MenuBox, is that it should show over the PostBox with a delete button so they can delete the post.
But now when i try to toggle it, it toggles all the boxes, is there a possible way of like making $("$(this) .MenuBox").click(
Anyone got any clue?
Sorry if the explanation is bad..
Provided that .MenuBox is a child of $(this):
$(this).find('.MenuBox').click(...);
I'm fairly new to JS and am trying to write my own library using this blog post, and would like a hand. (Apologies if this is too vague for an SO question)
I'm trying to write a function that shows or hides a queried element based on the status of a queried checkbox (and another for a radio button if I can't do it in one method) on a form.
So I'm looking to end up with something like this:
$(divId).checkToggle(checkBoxId);
So the div will start as hidden. When the checkbox is clicked, the div will toggle to visible. When the checkbox is unchecked, I'd like the div to hide again and any input fields inside it to be cleared (the probably will be only one input field).
I know that this function isn't really going to be very combine-able or reusable, but I would use it so often for just that one thing that I'm going to overlook it.
Okay, enough preamble. Here's what I have so far.
Could I have some suggestions on how to change/finish my checkToggle method? Thanks!
This worked for me:
$(document).ready(function(){
$('#checkbox1').change(function() {
if($(this).attr('checked')) {
$("#myDiv").slideDown(1000);
}
else
{
$('#myDiv').slideUp(1000);
}
});
});