B4b4j1
B4b4j1

Reputation: 460

Javascript function to submit form from browser shortcut

In order to submit several sites on this analysis website : https://www.outiref.fr I'd like to create a browser shortcut submitting automatically the visiting page to this site.

I have the same shortcut to submit a google search with "site:" :

javascript:(function(){window.open('http://www.google.com/search?tbs=cdr%3A1%2Ccd_min%3A1%2F1%2F2000&q=site%3A'+encodeURIComponent(location.href))})();

I try to use the same method, but I can not achieve my goal with

javascript:(function(){window.open('https://www.outiref.fr')(
window.location='https://www.outiref.fr')(document.getElementById("audit_uri")(encodeURIComponent(location.href)).InputEvent(document.getElementById("audit_save").submit()))})();

Edit: I want to fill up the form, not submitting it.

Upvotes: 0

Views: 105

Answers (1)

davidb
davidb

Reputation: 111

That not possible. Google provide URL like /search=XXX for launch search directly but not outiref. In outiref the search is only in JS and you can't trigger an element in other site from your website.

And more, outiref only provide an URL with /YOUR_SEARCH but we cannot use that because the page is cached and is generate previously. You can see because in URL of https://www.outiref.fr/audit+test.com+5a7d91599a8a836.php you have a hase in the last part of url and you can't access to https://www.outiref.fr/audit+test.com.php directly.

Upvotes: 1

Related Questions