0

I need a way to automate on startup opening a URL then once the url has loaded call an on page function

And i have no idea how to approach this, I cant think of a way to do it via powershell and I dont know any other language very well any help would be appreciated even more so if it was written for a 5 year old.

Gleap
  • 1
  • 1
  • lookup window.onload(), $.ready(), etc – dandavis Sep 23 '14 at 18:17
  • If you're trying to interact with a website from the command line, you can try [browser automation tools](http://stackoverflow.com/questions/13632934/tool-for-automated-testing-web-application) or [headless browsers](http://stackoverflow.com/questions/814757/headless-internet-browser). – Jonathan Lonowski Sep 23 '14 at 18:23

2 Answers2

1

Im not sure if im understanding correctly... but maybe you are looking something like this:

<html>
<head>
</head>
<body>
<!-- Put your html here -->
....
....
....

<!-- Scripts the bottom of the page -->
<script>
startup_function();

function startup_function(){
alert('Hello');
}
</script>
</body>
</html>
Chico3001
  • 1,853
  • 1
  • 22
  • 43
0

PLease keep your javasript file inside body after html . and use

window.load();
Amar1989
  • 502
  • 1
  • 3
  • 17