
Javascript Script Needed
- or -
Post a project like this2679
$40
- Posted:
- Proposals: 16
- Remote
- #2167756
- Awarded
Asp.Net | Laravel | Android | iOS | Flutter | PHP | Wordpress | Woocommerce | C#.NET | Graphics & Web Design | SEO

AI & Data Science Engineer | Nodejs | Ruby On Rails | AWS | GCP | Python | React | Angular |

23+ years expert in PHP, MySQL, HTML, CSS, JavaScript, jQuery, Ajax, Bootstrap, Chrome Extension, VB, VBA, AutIT Programming & Website Data Scraping
2412663455855151793055220719004092608361075872231430557726710886812324762363363
Description
Experience Level: Entry
Hi everyone,
I am looking for a Plain Javascript Script.
Please DO NOT use JQuery.
The script should run an ajax request 5 seconds after page load.
Please use a local text file for testing purposes. We will change to an external URL later.
The response will be a number 1,2,3 or 4
If the response is 1 or 4, I want to redirect to a web page so let's use www.google.com for testing purposes.
If the response is 2 or 3 we do nothing.
There should be a button on the web page.
If the button is clicked we want to repeat the process.
The script should kill any existing ajax request and then run a new ajax request after 5 seconds.
The response will be a number 1,2,3 or 4
If the response is 1 or 4, I want to redirect to a web page so let's use www.google.com for testing purposes.
If the response is 2 or 3 we do nothing.
This process can be repeated as many times as the user needs by re-clicking the button.
Don't forget the first time the script is run is following a page load.
Please DO NOT simply reload the page for ongoing requests.
Please respond after ensuring you can deliver this script
Good luck and thank you.
I am looking for a Plain Javascript Script.
Please DO NOT use JQuery.
The script should run an ajax request 5 seconds after page load.
Please use a local text file for testing purposes. We will change to an external URL later.
The response will be a number 1,2,3 or 4
If the response is 1 or 4, I want to redirect to a web page so let's use www.google.com for testing purposes.
If the response is 2 or 3 we do nothing.
There should be a button on the web page.
If the button is clicked we want to repeat the process.
The script should kill any existing ajax request and then run a new ajax request after 5 seconds.
The response will be a number 1,2,3 or 4
If the response is 1 or 4, I want to redirect to a web page so let's use www.google.com for testing purposes.
If the response is 2 or 3 we do nothing.
This process can be repeated as many times as the user needs by re-clicking the button.
Don't forget the first time the script is run is following a page load.
Please DO NOT simply reload the page for ongoing requests.
Please respond after ensuring you can deliver this script
Good luck and thank you.
Mark H.
98% (28)Projects Completed
30
Freelancers worked with
28
Projects awarded
51%
Last project
28 Jan 2019
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-

Mark, please share your website link.
-

Hi
I am interested in this, can you tell me if the final url to be called via ajax is on the same server as the one the script will be on, otherwise i think you are going to hit issues with CORS (Cross-origin resource sharing).
720935720930
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies