Skip to content

Instantly share code, notes, and snippets.

@arthur-abogadil
Last active April 4, 2021 06:40
Show Gist options
  • Save arthur-abogadil/e9214f3bd8beec785bd8d4d7138632ba to your computer and use it in GitHub Desktop.
Save arthur-abogadil/e9214f3bd8beec785bd8d4d7138632ba to your computer and use it in GitHub Desktop.
To enable ...
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<div class="center page_1">
<form class="center siteschecker-form" id="siteschecker-form">
<div class="form-field">
<label for="businessname">Business Name: </label> <br />
<input class="inputset" type="text" name="business-name" id="business-name" placeholder="SitesNStores">
</div>
<div class="form-field">
<label for="url">URL</label> <br />
<input class="inputset" type="text" name="url" id="url" placeholder="https://www.sitesnstores.com.au">
</div>
<div class="form-field">
<br />
<input class="inputset" type="submit" name="submit" id="submit">
</div>
</form>
</div>
<div class="center page_2">
<div class="progress">
<div class="progres_bar"></div>
<div class="progres_message"></div>
</div>
</div>
<div class="center page_3">
<div class="results">
</div>
</div>
<style>
.siteschecker-form {
width: 100%;
}
div.form-field {
}
input.inputset {
width: 100%
}
.center {
margin: auto;
width: 50%;
padding: 10px;
}
.page_1 {} // inputs
.page_2 {} // progress
.page_3 {} // results
</style>
<script>
$( document ).ready(function() {
// handshake test
axios.get('http://localhost:3000/scanner/external')
.then(function (response) {
// handle success
console.log(response);
})
.catch(function (error) {
// handle error
console.log(error);
})
.then(function () {
// always executed
});
// end handshake
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment