cancel
Showing results for 
Search instead for 
Did you mean: 

If.. then... On javascript console

yoann
Champ in-the-making
Champ in-the-making
Hi guys !

On a webpage, I have a list with each result showing a button I want to automatically click. The issue is : sometimes the click makes me leave the page and brings me to another url. When this happens I just want to go back to the list (so make a "go back" on the brower) and click the next button of the list. 

How would you do that ?
Thanks a lot, really a lot, for your answer !  Smiley Happy

3 REPLIES 3

yoann
Champ in-the-making
Champ in-the-making
I ve got something, in case it can help :

<br>
window.location.href = 'https://nameofthenetworkingwebsite.com/vsearch/f?type=all&keywords=painter&orig=GLHD&rsid=&pageKey=o...';

iimPlay("#click.iim"); //make a click on the first connect button, through the extension imacros

var url = iimGetLastExtract(1); // to get the current url

if (/https:\/\/www.nameofthewebsite.com\/profile/.test(url)) {
window.history.back();
} else {
iimPlay("#click2.iim"); // if I am still on the search result list, click on the next connect button, and so forth until all the ones on this page are done.

}
</br>

It is a mix of JS and the language that the firefox extension Imacros uses.. And it doesn't work Smiley Wink If it possible to do it all in Javascript it's even better !

cleseach
Star Contributor
Star Contributor
Hi Yoann,

You post in a french forum. Please, use french or post in the english forum.
Shoud should also describe how your problem is an Alfresco related one.

Best regards,
Charles

yoann
Champ in-the-making
Champ in-the-making
Désolé ! Smiley Happy Et je n'avais pas compris que c'était lié à Alfresco absolument. Désolé je vais demander de l'aide ailleurs  Smiley Happy