chesapeake funeral home
Serializing form inputs in jQuery is extremely easy. Uploading files is a method of transferring file stream to the background by submitting data from Form form. [Solved] Php jquery ajax submit always comes back as ... jQuery get () same as post (), but uses HTTP GET request. jQuery Form Plugin by jquery-form You need to create the js file that you are going to use. The jQuery ajax () method provides core functionality of Ajax in jQuery. There are two main ways to submit a form: The first - to click <input type="submit"> or <input type="image">. jQuery and jquery form plugin - empty $_POST submit. It is very flexible and can be configured to the heart content. For example, if you had a . Most implementations will specify a success handler: jQuery Function to Prevent Multiple Submit. jQuery Forum Move this topic Forum : Getting Started Using jQuery Using jQuery Plugins Using jQuery UI Developing jQuery Core Developing jQuery Plugins Developing jQuery UI QUnit and Testing About the jQuery Forum jQuery Conferences jQuery Mobile Developing jQuery Mobile I have been trying, and trying, and trying to debug this form with CKEditor. You can use the submit() method to submit an HTML form (i.e. When you click save I used jQuery Form Plugin to submit it. Follow the steps to implement form validation using jQuery. AJAX has the option of submitting a form without refreshing the page. All callbacks are called in the context of the respective form (i.e. 10 . [crayon-61c864a29355d583927146/] So, we need use context, to make ajax callback and submit […] The submit event occurs when a form is submitted. Prev jQuery Form Submit by Id, Class, Name and Tag. Replaces the default submit. Build a Multi-Step Form Interface. Update based on your edit. When the Submit button is clicked, the Confirmation Message Box (Dialog) with OK (Yes) and Cancel (No) buttons will be displayed . Want more? Add PHP code. There are two thing with respect to one operation in the web. So, what works: form submission works, the jquery script is activated and forwards the input info to the callback PHP file. This is the HTML form to be submitted via jQuery AJAX. var form = $('#fileUploadForm')[0]; var data = new FormData(form); 2.1 processData: false, it prevent jQuery form transforming the data into a query string $.ajax({ type: "POST", enctype: 'multipart/form-data', processData: false, // Important! There are two main objects that you will interact with using the Forms 2.0 API. Include the jQuery library. 1. Get all of the data from the form using jQuery. But, before that, the DOM (document object manipulation) must be loaded. Follow the steps to implement form validation using jQuery. Background. As of jQuery 1.5, the success callback function is also passed a "jqXHR" object (in jQuery 1.4, it was passed the XMLHttpRequest object).. While processing this AJAX request, it hides submit button and replaces it by showing progress notification message with loader. Once the submit button of the form is clicked, the callback function is fired. This event can only be used on <form> elements. But I can't work out how. Since jQuery is a JavaScript library and JavaScript statements are executed sequentially, with animations, it might happen that even before the effect is completed, the following lines of code get executed. A form has both a submit() method and an onsubmit event. This article introduces a practical approach to how to submit a form using the jQuery Ajax POST request. The value of these two input fields are already populated, we want an alert message to displayed when the form is submitted. Now I need to make some changes on the main HTML page after the form gets submitted successfully. Conclusion. Create a simple HTML form with jQuery function. The handler can check the data, and if there are errors, show them and call event.preventDefault (), then the form won't be sent to the server. Constraint validation is not triggered. Create a table in database. errorClass {string} . The Google RECaptcha 2.0 will be validated using ASP.Net RequiredFieldValidator. A jQuery Form Wizard is a jQuery plugin that assists with the creation of forms with some sort of form flow (without refreshing your page). jQuery Form plug-in is an excellent Ajax form plug-in that can easily and intrusively upgrade HTML forms to support Ajax. GET is basically used for just getting (retrieving) some data from the server. The jQuery Unobtrusive AJAX library has been around for almost 10 years, and was first introduced in ASP.NET MVC 3.0, just as adoption of HTML5 custom data-* attributes was becoming commonplace and supported widely across browsers. This method is similar, but not identical to, activating a form's submit <button>.When invoking this method directly, however: No submit event is raised. Problem is that, for some reason, the specific function that handles the form on that PHP file is not activated. Perform action after form submit. Using the Code. For now, as a proof of concept, I am just trying to stop the form being submitted at all. PHP_SELF is a variable that returns the current script being executed. (Link to how to build a module.) Example: Submits the form via Ajax, using jQuery Form plugin, when valid. The second - press Enter on an input field. Most implementations will specify a success handler: The MktoForms2 object is the top-level publicly visible namespace for Forms2 functionality and contains functions to create, load, and fetch Form objects. Two commonly used methods for a request-response between a client and server are: GET and POST. function getData(callback) { // you should move the creation of xmlhttp in here // so you can make multiple getData calls if needed // if you keep xmlhttp outside the function the different calls to getData will interfere // with each other xmlhttp.open("GET", URL ,false); // false should be true, to make it async . Create a simple HTML form with jQuery function. 2.1 Create a Javascript FormData object from a form. Display errors if there are any. Submit HTML Form data using regular jQuery ajax () function. I tried this using jQuery. Output. Many developers would have valid concerns about adding 100k . Here Mudassar Ahmed Khan has explained with an example, how to validate (check) Google RECaptcha version 2.0 before Form Submit using JavaScript and jQuery in ASP.Net. This is the code I am using. After success message A callback to the jQuery method can be done using the submit button. Cross-domain AJAX request is possible in two ways You can use the location.reload() method to reload or refresh an entire web page or just the content inside an element.The .reload() method can be triggered either explicitly (with a button click) or automatically.You can also use the .reload() method inside an Ajax success callback function and this is very simple. m using jquery to submit my mvc form $("#form1").submit(); i want to use callback function for success and failure after form submission. The $ just says that what follows will be jQuery code. A callback is a function that will be executed only after the current effect gets completed. On clicking the submit button, this jQuery script sends form data to PHP page via AJAX. Example: Submits the form via Ajax, using jQuery Form plugin, when valid. In this tutorial, I explained how to send Cross Domain AJAX Request with jQuery and best viagra prices PHP. Callback for handling the actual submit when the form is valid. the <button> element) which has the type attribute set to button (i.e. I have a simple form with remote=true. Please post your Suggestions here. Create a table in database. It is also passed the text status of the response. Gets the form and the submit event as the only arguments. Success function. Here's an ASP.NET MVC example of showing a confirm dialog with yes/no button that returns a result either to submit a form or not using jQuery UI Dialog. In JavaScript, a callback is easier to create. Since we wanted a button-like notification icon I decided to go with the form engine. $ (function { // Get the form. Learning how to do simple form validation by yourself is a great skill to have. This tutorial also provides you a live demo of the jquery multi step form wizard plugin with complete source code and validation. If you would like to perform a jQuery or JavaScript action after a form is submitted, there are three different events you may use, depending on the "On Submit" action you have selected in your form's Settings. ; The HTMLFormElement.requestSubmit() method is identical to activating a form's . The right place to submit a form via Ajax after it is validated. The jQuery post () method sends asynchronous http POST request to the server to submit the data to the server and get the response. This plugin makes it easy for you to create the alert, confirm, prompt dialog boxes with custom styles & animations. MktoForms2 Methods Method Description Parameters Returns .loadForm(baseUrl, munchkinId, formId, callback) Loads … jQuery Form Validation, JavaScript, and jQuery Forms Found on CodeCanyon. . The add user form will be submitted using jQuery Ajax POST request. I cannot for the life of me get the form to submit if I call form.submit(); from within the callback of my script im using to Output. In addition, the plug-in includes other methods: formToArray(), formSerialize(), fieldSerialize . Easy to use and highly flexible! Note that "deftext" has to be a form field, because that's what val() works with. It is a multipurpose plugin for alert, confirm and dialog with many more. In the following example we have a form with two input fields. The MktoForms2 object and the Form object. jQuery selector of the form submit button that will trigger the form Validation. ready (function {var options = {target: ' #output1 ', // target element(s) to be updated with server response beforeSubmit: showRequest, // pre-submit callback success: showResponse // post-submit callback // other available options: //url: url // override for form's 'action' attribute //type: type // 'get' or 'post', override for form's . Recently, in our work, we need to realize the function of uploading pictures on the web page to FTP server. It sends asynchronous HTTP requests to the server. The success and after callbacks return the server's JSON response as their first argument. Do it on the the submit of the form. Add PHP code. To submit a form via AJAX, your script will need to handle four tasks: Capture the form submit button so that the default action does not take place. It uses ajaxForm to bind the form and demonstrates how to use pre- and post-submit callbacks. using this callback will override the native HTML form.submit() and prevent the form from . 2. jQuery.ajax. Both actions lead to submit event on the form. Unlike many/most other elements, browsers do not fire the element's onsubmit event when the submit() method is called. I have used the jquery adapter but it still doesn't seem to be working. Note: The GET method may return cached data. Say for example, a form has a save and delete buttons inside the BeginForm . This contains two sub parameters , the first one holds the returned data from the requested page and second one holds the status of the request. Here is how you would go about doing that: Step 1. How to do a Jquery Callback after form submit? This can create errors due to overlapping of . A jQuery plugin that provides great set of features like, Auto-close, Ajax-loading, Themes, Animations and more. to check for the number of notifications javascript triggers the jQuery("#edit-update-notifications-button").change(); command. Gets the form and the submit event as the only arguments. jQuery submit() Method Syntax $("form").submit(function(){ //code to execute when the form is submitted. This is useful especially if the form consists of multiple buttons that have the capability to submit a form. Include the jQuery library. The jQuery code in the following example will submit the form on click of the button (i.e. Two methods come supported natively: .serialize() and .serializeArray(). jQuery Mobile Form Example Next. // prepare the form when the DOM is ready $(document).ready(function() { var options = { target: '#output1', // target element(s) to be updated with server response beforeSubmit: showRequest, // pre-submit callback success: showResponse // post . The submit event is sent to an element when the user is attempting to submit a form. Step 3 — Handling Form Submit Logic in JavaScript and jQuery. Here Mudassar Ahmed Khan has explained with an example, how to display Confirmation Box (Dialog) before Form Submit in ASP.Net MVC Razor. For example, when the request is raised, one function will raise one event when the request is successfully finished, again another function will be fired. It concerns a very standard form validation and inputting info to database. Callback for handling the actual submit when the form is valid. options: Configuration options for Ajax request. Example: Submits the form via Ajax, using jQuery Form plugin, when valid. I tried this using jQuery. add. In Ajax functions many callback functions exist. Answer: Use the jQuery submit() Method. The 'beforeSubmit' callback is invoked with three arguments: the form data in array format, the jQuery object for the form, and the Options Object passed into ajaxForm/ajaxSubmit. However, if you don't use jQuery in your site (which is quite common in 2019), you'll find this becomes a bit of a headache. The success callback function is passed the returned data, which will be an XML root element or a text string depending on the MIME type of the response. To do this, we have set . Data validation means checking for the required data to be entered in the form fields. So I have a form that I render in a Block that does Ajax calls to my server. Add the latest version of jQuery library and the jQuery Swyft_Callback plugin's files to the web page. If the 'beforeSubmit' callback returns false then the form will not be submitted. Forms can be submitted either by clicking an explicit <input type="submit">, <input type="image">, or <button type="submit">, or by pressing Enter . In this article, we discussed the jQuery confirm plugin which incorporates the functionality of alert, confirm, and dialog in one. Hi guys, I want to do some custom validation work (via ajax) before I will allow a lead to be submitted. The JavaScript Confirmation Message Box (Dialog) will be displayed using jQuery by attaching a Submit event handler to the Form. It uses html5 data attributes that indicate what and how the elements in the form should be validated. The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. While the names are fairly self-explanatory, there are many advantages to using them. You can use this variable in the action field of the form. It is invoked as soon as files are added to the fileupload widget - via file input selection, drag & drop or add API call. Replaces the default submit. Both of these methods support numerous options which allow you to have full control over how the data is submitted. This method is a shortcut for .on( "submit", handler ) in the first variation, and .trigger( "submit" ) in the third.. . When you click on the button to submit the lead form, it displays the alert, but then the form is submitted anyway even though propagation of . The right place to submit a form via Ajax after it is validated. tell me perfect solutions.how i can use callback functions after form submission. GET - Requests data from a specified resource. [crayon-61c864a29355a805250827/] If we using the variable and then make return, it's also not working. Right? jQuery post () is a shorthand function of ajax (). The main purpose of submitting forms to self is for data validation. callback; The callback parameter is defined for a function to be executed if the request gets succeeded. Different methods of handling cross domain AJAX requests are covered in this article. The callback function runs after the completion of the outer function. Syntax: $.ajax (url); $.ajax (url, [options]); Parameter description: url: A string URL to which you want to submit or retrieve the data. It is also passed the text status of the response. Gets the form and the submit event as the only arguments. Topic: JavaScript / jQuery Prev|Next. This form is actually on an HTML Dialog, which gets closed as soon as the Submit button is clicked. That is, we simply have to pass the callback function as a parameter to another function and call it right after the completion of the task. The HTMLFormElement.submit() method submits a given <form>.. Definition and Usage. A simple jQuery Ajax example to show you how to submit a multipart form, using Javascript FormData and $.ajax (). I'm fairly new to jQuery. The submit callbacks returns the node as the last parameter, the dynamic callbacks returns the node and the input as the last 2 parameters. This plugin is actively developed, I would love you have your suggestions. Using the jQuery.load() function you can load HTML from a URL that will render . 6 jQuery Form Wizard Plugins. So, we will create an example to add a user and show in the list. This is the most important and heavily used functions of jQuery Ajax functions. refer to the form using this inside your callbacks). 1. Asked 7 Months ago Answers: 5 Viewed 205 times I have a simple form with remote=true. Swyft_Callback is a jQuery plugin used to create an animated, customizable, dynamic contact/feedback form with input mask integration in your web app.. How to use it: 1. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Here, we take an example of a simple registration form and validate the data before insert into the database. Now I need to make some changes on the main HTML page after the form gets submitted successfully. getJSON () also uses HTTP GET like get (), but loads JSON-encoded data from the server. It is a small library, 4kb when minified, that makes use of jQuery's AJAX capabilities. But preventDefault, is not working inside the ajax. The success callback function is passed the returned data, which will be an XML root element or a text string depending on the MIME type of the response. Here is the page - if you go to "your words" you will see the form. HubSpot's documentation suggests using the onFormSubmit callback property, as follows: This ostensibly seems like a user-friendly solution to the requirement. Example we have a form like this [crayon-61c864a293550293049371/] We want validate with ajax, and if error, make form not submit. type="button"). POST - Submits data to be processed to a specified resource. after(res): runs after the request has completed and your server returns a response. input type submit call using jquery function jquery submit form submit jquery call form submit jquery callback how to call a function on form submit in jquery jquery . As of jQuery 1.5, the success callback function is also passed a "jqXHR" object (in jQuery 1.4, it was passed the XMLHttpRequest object).. Then it changes that element's value to "Cindy". 1. Introduction Most AJAX code in the Drupal documentation focuses on traditional json/_get() applications, which require json manipulation of the information when it arrives on the client side. Using jquery you can intercept the form submission easily, grab the data from the form and then pass it on via ajax to handle the form submission. before(): runs before the request is sent. But this doesn't ensure that the tasks get performed after some form of response of the form submission. The Google RECaptcha version 2.0 allows to validate the Captcha response on client side using its Callback functions. jQuery Form has two core methods -- ajaxForm() and ajaxSubmit(), which combine functions from controlling form elements to deciding how to manage the submission process. Replaces the default submit. If you will be using jQuery's Ajax Form Submit, you can send the form data to the server without reloading the entire page. callback: function to be executed when request succeeds. Create a table in database. // prepare the form when the DOM is ready $ (document). }); jQuery submit() Example. It is useful to develop an asynchronous JavaScript code. The right place to submit a form via Ajax after it is validated. In particular, the form's onsubmit event handler is not run. Replaces the default submit. <form>) using jQuery. ASP.NET MVC client side validation is based on the jQuery validation plugin. This all inside of a plugin. This will update portions of a web page - without reloading the entire page. How to do a Jquery Callback after form submit. The .serialize() method serializes a form's data into a query string. data: json data to be sent to the server with request as a form data. . It can only be attached to <form> elements. This form is actually on an HTML Dialog, which gets closed as soon as the Submit button is clicked. NOTE: This tutorial requires knowledge about custom module development or function altering. Welcome to jquery-confirm! $("#myform").submit(function(event) { // do the task here .. }); How do I attach a callback, so that my code gets executed only after the form is successfully submitted? The following code controls the HTML form beneath it. In this tutorial, we will explain you how to use multi step form wizard plugin with validation. And you can easily customize this jQuery multi step form wizard for jquery and css library. Forms can be submitted to the web page itself using PHP. If you change it to some other type of HTML element, val() won't do anything. Create a table in database. First, it selects the HTML element with the ID "deftext". url: request url from which you want to submit & retrieve the data. The add callback can be understood as the callback for the file upload request queue. But you can get even deeper with these useful jQuery and JavaScript form downloads from CodeCanyon: 1. jQuery Step Wizard With Step Form Builder: Timon Step Form Submit the form data using AJAX. When you use jQuery().trigger("submit") jQuery is calling the native submit() method for you but since it doesn't "see" the native event and the native submit() doesn't . Using AjaxSubmit () method to realize Form callback after submitting form. Explore the library at https://www.codecourse.com/lessonsOfficial sitehttps://www.codecourse.comTwitterhttps://twitter.com/teamcodecourse If you have ever wanted to send a form without reloading the page, provide a look-ahead search function that prompts the user with suggestions as they type, or auto-save documents, then what you need is AJAX (also known as XHR).A behind-the-scenes request is sent to the server, and returning data to your form. Note: Adding additional event listeners via bind (or on method with jQuery 1.7+) method is the preferred option to preserve callback settings by the jQuery File Upload UI version. Callback for handling the actual submit when the form is valid. Here, we take an example of a simple registration form and validate the data before insert into the database. The submit() method triggers the submit event, or attaches a function to run when a submit event occurs. Submit an HTML Dialog, which gets closed as soon as the only arguments and! Natively:.serialize ( ) method and an onsubmit event handler is not activated variable in the list our,... By yourself is a multipurpose plugin for alert, confirm and Dialog one. When you click save I used jQuery form plugin, when valid form has both a submit event handler not. Jquery Swyft_Callback plugin & # x27 ; t do anything callback for file. Return, it & # x27 ; s ; elements get method may cached. First, it selects the HTML form ( i.e a shorthand function Ajax. Post - Submits data to PHP page via Ajax, using jQuery submit,! We take an example of a web page to FTP server have valid concerns adding! The HTMLFormElement.requestSubmit ( ) method to submit event occurs when a submit )... Be jQuery code in the form consists of multiple buttons that have the capability submit... But loads JSON-encoded data from the server this plugin is actively developed, I would love you have your.... Get all of the button ( i.e the DOM ( document object manipulation ) must loaded! Is not activated Definition and Usage work out how this article, we need to create, load and! Form & gt ; element ) which has the type attribute set to button ( i.e in -! Ago Answers: 5 Viewed 205 times I have a form submit button and replaces it by showing notification. The submit ( ) method and an onsubmit event submit... < /a > 2. jQuery.ajax HTMLFormElement.requestSubmit... After the form return, it hides submit button is clicked, the jQuery code in the following we... Uses ajaxForm to bind the form loads JSON-encoded data from the form gets submitted successfully (... Many developers would have valid concerns about adding 100k page - if you go to & ;! The form is actually on an HTML Dialog, which gets closed as as! Callbacks ) + jQuery ) and prevent the form consists of multiple buttons that have the capability to submit.. Perfect solutions.how I can & # x27 ; s Ajax capabilities and replaces it by progress... Preventdefault, is not run take an example of a web page to FTP server jQuery PHP! A submit event is sent > Setting input Values in jQuery with the Id & quot ; button gt! A save and delete buttons inside the Ajax this inside your callbacks ) make... This will Update portions of a simple registration form and the submit ( ) function you can use callback after! The HTMLFormElement.requestSubmit ( ) method to submit a form via Ajax, using jQuery in PHP - Mediator... Insert into the database a proof of concept, I would love you have your.... Flexible and can be understood as the submit ( ) method triggers the submit event occurs when. Callback will override the native HTML form.submit ( ) is a variable that returns current... Runs after the request is sent to the callback PHP jquery form submit callback is activated!, val ( ) function you can load HTML from a form or attaches a function be. With respect to one operation in the form and validate the data is.. Form with CKEditor if you go to & lt ; form & # x27 ; value! Has completed and your server returns a response as post ( ) method triggers the submit ( ) also HTTP. Inside the Ajax request succeeds get is basically used for just getting ( retrieving ) some data from form! Input fields: //www.geeksforgeeks.org/how-to-create-a-php-form-that-submit-to-self/ '' > Setting input Values in jQuery with the val ( ), but HTTP... Respect to one operation in the following example will submit the form.. This is the top-level publicly visible namespace for Forms2 functionality and contains functions to create the alert,,... To create, load, and Dialog in one use of jQuery library and the submit,... Use the jQuery code in the following example we have a form & gt element. For some reason, the callback PHP file indicate what and how the data is submitted MktoForms2 object is HTML... _Post submit... < /a > Update based on your edit already,... How to create the alert, confirm, prompt Dialog boxes with custom styles & ;... Being executed submission works, the form load HTML from a form '' > (! Go about doing that: step 1 before form submit + jQuery some. ( jquery form submit callback to how to do a jQuery callback after form submission works, the DOM document! Html5 data attributes that indicate what and how the elements in the action of.: Submits the form and the jQuery Swyft_Callback plugin & # x27 ; seem. Some form of response of the form submission works, the callback PHP file is not inside. The functionality of alert, confirm, and Dialog with many more that use... Validation means checking for the required data to be working in one it to some other type of element. Values in jQuery with the Id & quot ; file stream to the background by submitting data from server. This plugin is actively developed, I would love you have your suggestions response the. Submit an HTML Dialog, which gets closed as soon as the arguments. Are already populated, we need to create the alert, confirm and Dialog many... Callback function is fired: the get method may return cached data of submitting forms self. A specified resource & quot ;, confirm, prompt Dialog boxes with custom &! Should be validated input info to the form via Ajax, using jQuery by a! ; s files to the server with request as a proof of concept, I would love you your... Url from which you want to submit event on the form validation.... Via Ajax after it is useful especially if the form submission inside your callbacks ) soon. Id & quot ; confirm, prompt Dialog boxes with custom styles amp! > the $ just says that what follows will be jQuery code in the web page to FTP server,! Library, 4kb when minified, that makes use of jQuery Ajax functions namespace for Forms2 and! To have just trying to stop the form on that PHP file Dialog ) be... Natively:.serialize ( ) same as post ( ) function you can use callback functions after form.. $ _POST submit... < /a > the $ just says that what follows be...: runs before the request is sent your edit as their first.. Submit... < /a > Welcome to jquery-confirm identical to activating a form that to... Be jquery form submit callback to the callback function is fired want to submit it to use pre- and post-submit callbacks 2.! You will see the form using this inside your callbacks ) when the user is attempting to a. Other type of HTML element, val ( ) method serializes a form with CKEditor a callback easier. Values in jQuery with the val ( ) and.serializeArray ( ) function you can use callback functions get... But it still doesn & # x27 ; t do anything PHP that! If we using the jQuery.load ( ), fieldSerialize form on click of the jQuery adapter but still. Mediator < /a > 2. jQuery.ajax some form of response of the jQuery (... You a live demo of the button ( i.e to PHP page Ajax! Make some changes on the main HTML page after the request has completed and your server a! File that you are going to use data before insert into the database attributes! > how to use build a module. to FTP server returns response... To create a JavaScript FormData object from a url that will render the example! A proof of concept, I would love you have your suggestions form being submitted at all to a resource. Is based on the web page create, load, and trying to stop the form being at! Have a form submit event occurs when a submit ( ) method form consists multiple! Uses html5 data attributes that indicate what and how jquery form submit callback elements in the example! Stop the form response on client side validation is based on your edit bind the form -... A JavaScript FormData object from a form is actually on an HTML form ( i.e add can... Have valid concerns about adding 100k current script being executed uploading pictures on the web page - if change. Enter on an input field still doesn & # x27 ; s files to heart! Into the database covered in this article concept, I would love you have your suggestions provides set! ; s value to & quot ; Cindy & quot ; deftext quot. - if you change it to some other type of HTML element, val ( ) method a... The button ( i.e gather information from the form and validate the.! Jquery post ( ), but uses HTTP get request and validation that render. Its callback functions after form submit ): runs before the request has completed and your server a! Say for example, a form adapter but it still doesn & # x27 ; s onsubmit event I just. Easier to create the alert, confirm, and trying to stop the form via Ajax, using form! Get ( ) also uses HTTP get request HTML page after the request has completed and your returns!