Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(function() {
- $(".search_button").click(function() {
- var searchString = $("#search_box").val();
- var data = 'search='+ searchString;
- if(searchString) {
- // ajax call
- $.ajax({
- type: "POST",
- url: "include/do_search.php",
- data: data,
- beforeSend: function(html) {
- $("#results").html('');
- $("#searchresults").show();
- $(".word").html(searchString);
- },
- success: function(html){
- $("#results").show();
- $("#results").append(html);
- }
- });
- }
- return false;
- });
- });
- </script>
- </head>
- <body>
- <div id="asd">
- <h6>hatez meg most nem megy. de majd fog, remeljuk.</h6>
- <div style="margin:20px auto; text-align: center;">
- <form method="post" action="include/do_search.php">
- <input type="text" name="search" placeholder="nick" id="search_box" class='search_box'/>
- <input type="submit" value="kep" name="kep" class="search_button" />
- <input type="submit" value="video" name="video" class="search_button" /><br />
- </form>
- </div>
- <div>
- <div id="searchresults">Az altalad keresett nev: <strong><span class="word"></span></strong></div>
- <ul id="results" class="update">
- </ul>
- </div>
- </div>
Add Comment
Please, Sign In to add comment