Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['url'])){
- $display_data = isset( $_POST['url'] ) ? $_POST['url'] : '';
- echo $display_data;
- var_dump($display_data);
- die(); //biar stop
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Document</title>
- </head>
- <body>
- <form action="" method="post">
- <input type="text" class="input-text" name="inputtxt" placeholder="Input Your Text">
- </form>
- <script src="jquery-1.11.1.js"></script>
- <!--script src="custom.js"></script-->
- <script>
- (function($) {
- $('.input-text').on("blur", function () {
- //get the selected value
- var selectedValue = $(this).val();
- $('.fuck').text( selectedValue );
- // alert($(this).val());
- //make the ajax call
- $.ajax({
- url: "test2a.php",
- type: "POST",
- data: {url : selectedValue},
- success: function(){
- alert('success');
- },
- error: function(obj, error){
- alert( obj.statusText);
- console.log(obj);
- }
- });
- });
- })(jQuery);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment