Promise example
How do I make an promise example?
Promises enable asynchronously dependent functionality with an easy to read API.. What is a promise example? How do you make a promise example? This script and codes were developed by Coran Spicer on 15 October 2022, Saturday.
Promise example - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Promise example</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input type="text" name="From:" placeholder="Please enter your name" id="love" />
<input type="submit" onclick="triggerPromise()" >
<iframe id="fuckoffcontainer" ></iframe> <script src='https://www.promisejs.org/polyfills/promise-7.0.4.min.js'></script>
<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Promise example - Script Codes CSS Codes
#love { display: block; position: relative; padding: 0.5rem 1rem; text-align: left;
}
#fuckoffcontainer { display: block; position: relative; opacity: 0; width: 100%; height: 300px; border: 0; transistion: opacity 0.3s ease-out;
}
#fuckoffcontainer.visible { opacity: 1;
}
Promise example - Script Codes JS Codes
function triggerPromise() { var from_name = $('#love').val(); // declare some functionality var jQueryPromise = $.ajax('https://www.foaas.com/off/Coran/'+from_name); var realPromise = Promise.resolve(jQueryPromise); realPromise.then( function(res) { var iframe = document.getElementById('fuckoffcontainer'); iframe.contentWindow.document.open() iframe.contentWindow.document.write(res); $('#fuckoffcontainer').addClass('visible'); });
};
Developer | Coran Spicer |
Username | cgspicer |
Uploaded | October 15, 2022 |
Rating | 3 |
Size | 2,343 Kb |
Views | 20,240 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Tile with special tiles experiment | 1,952 Kb |
Responsive Mixed with Absolute | 2,495 Kb |
Album 88 Tuner | 9,852 Kb |
Header logo that changes | 2,031 Kb |
FocalCenter.js for jQuery | 3,462 Kb |
Aaronmarino.com v2 styles | 2,863 Kb |
Fully Furnished | 3,613 Kb |
Drag and Drop Quiz | 3,837 Kb |
Fruit Stripe Background | 2,758 Kb |
BuildUp | 3,509 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Svg sky | Omodev | 7,070 Kb |
A Pen by Kenny Mark | Kennymark | 5,574 Kb |
Fluid Layout with Float | Jxqr97 | 1,785 Kb |
Revolving Text Landing Page Trial | TimRuby | 2,976 Kb |
No Vacancy 404 CSS Only | Sethkontny | 0 Kb |
TimelineMax Circular loader | Nicolund | 2,649 Kb |
Cut and Paste Roll Link | BottomlineInteractive | 2,546 Kb |
Simple Accordion | Wearebold | 3,683 Kb |
SVG Modified with Query String | Jnowland | 1,663 Kb |
A Pen by Mohomed Anees | Mohomedanees | 12,597 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!