Multiple click events into one

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Multiple click events into one

by zirjeo on Mon Oct 31, 2016 11:18 am

IE 11, Windows 10, VERSION BUILD=11.5.498.2403

This works decent as is, but it's a little slow having to check off one checkbox at a time, is there a way to speed this up and have it check all boxes at once?

Code: Select all
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:chktranstype CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:chktaxyear CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:chkbillstatus CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:chkamount CONTENT=YES
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:chktaxstatus CONTENT=YES
WIndows 10, IE11, VERSION BUILD=11.5.498.2403
zirjeo
 
Posts: 59
Joined: Thu Oct 27, 2016 6:49 pm

Re: Multiple click events into one

by iimfun on Tue Nov 01, 2016 12:39 am

If you mean "at once" = "with one command"
Code: Select all
URL GOTO=javascript:var<SP>cbs=document.querySelectorAll("input[type='checkbox'][name^='chk']");for(i=0;i<cbs.length;i++)cbs[i].checked=true;void(0);
iimfun
 
Posts: 239
Joined: Tue Jul 19, 2016 6:06 am

Re: Multiple click events into one

by zirjeo on Tue Nov 01, 2016 1:10 pm

Very nice! I didn't include all the checkboxes, I see you used 'chk' for name. I have a couple other boxes where the name starts with 'ddl' such as ddlmultiple and ddlexemption. I can get it to pick up those additional boxes by making a whole new line of code using 'ddl', but is there anyway to add it to your line of code above, I tried a couple different ways but no luck. If not adding the whole new line is fine, still much faster than how I had it.
Thanks!
WIndows 10, IE11, VERSION BUILD=11.5.498.2403
zirjeo
 
Posts: 59
Joined: Thu Oct 27, 2016 6:49 pm

Re: Multiple click events into one

by iimfun on Wed Nov 02, 2016 12:57 am

Ok, here is a more universal solution for you
Code: Select all
URL GOTO=javascript:var<SP>cbs=document.querySelectorAll("input[type='checkbox']");for(i=0;i<cbs.length;i++)if(cbs[i].name.match(/^(chk|ddl)/))cbs[i].checked=true;void(0);
iimfun
 
Posts: 239
Joined: Tue Jul 19, 2016 6:06 am

Re: Multiple click events into one

by zirjeo on Wed Nov 02, 2016 9:06 am

Works perfect. Thank you!
WIndows 10, IE11, VERSION BUILD=11.5.498.2403
zirjeo
 
Posts: 59
Joined: Thu Oct 27, 2016 6:49 pm

Re: Multiple click events into one

by zirjeo on Tue Feb 28, 2017 11:15 am

iimfun wrote:Ok, here is a more universal solution for you
Code: Select all
URL GOTO=javascript:var<SP>cbs=document.querySelectorAll("input[type='checkbox']");for(i=0;i<cbs.length;i++)if(cbs[i].name.match(/^(chk|ddl)/))cbs[i].checked=true;void(0);



Hello iimfun, my internet explorer settings were reset to default and now the javascript above is no longer working, ran malwarebytes too not sure if that messed it up. Any idea how i can fix this? I tried looking into the IE settings but no luck. Thanks
WIndows 10, IE11, VERSION BUILD=11.5.498.2403
zirjeo
 
Posts: 59
Joined: Thu Oct 27, 2016 6:49 pm

Re: Multiple click events into one

by chivracq on Tue Feb 28, 2017 12:13 pm

zirjeo wrote:
Code: Select all
WIndows 10, IE11, VERSION BUILD=11.5.498.2403

iimfun wrote:Ok, here is a more universal solution for you
Code: Select all
URL GOTO=javascript:var<SP>cbs=document.querySelectorAll("input[type='checkbox']");for(i=0;i<cbs.length;i++)if(cbs[i].name.match(/^(chk|ddl)/))cbs[i].checked=true;void(0);


Hello iimfun, my internet explorer settings were reset to default and now the javascript above is no longer working, ran malwarebytes too not sure if that messed it up. Any idea how i can fix this? I tried looking into the IE settings but no luck. Thanks

Related to your JavaScript IE Settings/Permissions, I would think... :idea:

=> For IE11: 'Internet Options' => 'Security' Tab => 'Internet' Zone => "Medium-high" or "Medium" => 'Custom Level' => 'Scripting' Section (nearly at the bottom) => 'Active scripting' = "Enable" + maybe 'Scripting of Java applets' = "Enable" => "OK".
+ Check on the 'Restricted sites' Zone that you didn't include your Site, ah-ah...!
+ Have a look as well on the 'Advanced' Tab if you don't have some Setting playing a role there as well...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6484
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Multiple click events into one

by zirjeo on Tue Feb 28, 2017 3:00 pm

I tried all of the above, no luck. I tried to reinstall Java as well. The IE settings look to be the same on my other computer which it works on so I'm not sure what exactly is happening, seems odd it doesn't work.
WIndows 10, IE11, VERSION BUILD=11.5.498.2403
zirjeo
 
Posts: 59
Joined: Thu Oct 27, 2016 6:49 pm

Re: Multiple click events into one

by chivracq on Tue Feb 28, 2017 4:16 pm

zirjeo wrote:I tried all of the above, no luck. I tried to reinstall Java as well. The IE settings look to be the same on my other computer which it works on so I'm not sure what exactly is happening, seems odd it doesn't work.

Well, then I don't know, it's been yearssssssss since I was using IE, I only had/have it installed since for iMacros Pb's specific to only IE, my Default Browser is FF or FF-forked Browsers that I know how to tune/tweak...

@iimfun is more of a CR-Lover I think, but maybe he'll have some Idea, he usually checks the Forum in about 8-10 hour time from now...

But, well, you could use FF in the meantime, if you are in a hurry, ah-ah...!, if you don't use any iMacros Commands in your Macros that are only supported by IE/iMB... Always good to have several Browsers installed anyway... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6484
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Multiple click events into one

by zirjeo on Tue Feb 28, 2017 5:45 pm

Unfortunately one of the pages I use requires IE, it's a pdf webpage and it doesn't seem to operate properly or at all on Chrome or FF. So hopefully @iimfun sees this. :)
WIndows 10, IE11, VERSION BUILD=11.5.498.2403
zirjeo
 
Posts: 59
Joined: Thu Oct 27, 2016 6:49 pm

Re: Multiple click events into one

by zirjeo on Tue Feb 28, 2017 7:47 pm

Disregard it's been resolved. I don't really get it but I had added the site to the compatibility view, was thinking this would be a good thing. So I removed it and it now works.
WIndows 10, IE11, VERSION BUILD=11.5.498.2403
zirjeo
 
Posts: 59
Joined: Thu Oct 27, 2016 6:49 pm


Return to General Support & Discussions

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

-->