Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8639895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:08:20+00:00 2026-06-12T11:08:20+00:00

This is in an HTML file. In the else section, I want to call

  • 0

This is in an HTML file. In the else section, I want to call a show-form(); function which is in an example.php page. Also, what’s the complete syntax for $.post();?

<script type="text/javascript">
    function nis(id){
        $(id).show("slow").delay(4000).hide("slow");
    }

    $(function() {
        setAutoComplete("searchField", "results", "autocomplete.php?part=");

        $('form[name=frm]').submit(function(event) {
            if($("#searchField").val().length===0)
            {
                nis('.divmsg');
                return false;
            }
            else {
                $.post("example.php", function() {});
            }
        });
    });
</script>

This is in example.php .. which is for giving you a declaration for any word you write in searchField.

<?php
    function show_form()
    {
        echo'<div  class="divmsg"> Wronge input :: </div>';
        echo'  <form name="frm" method="post" action="index.php?act=sm"> ';
        echo'<p class="textplz">Tybe a Definition you want ?!';
        echo'<p id="auto" >';
        echo'Word : <input id="searchField" type="text" name="searchField" />    <input  id="for-submitbutton" type="submit" name="sbm" value="Definition" /> ';
        echo' </p> </p>  </form>';
    }

    function submited()
    {
        require("dbconn.inc");
        $word=$_POST['searchField'];
        $sql="select * from definition where word like '".$word."'";

        $result=mysql_query($sql,$con);
        if(@mysql_num_rows($result)!=0)
        {
            while($rows=mysql_fetch_array($result))
            {
             $vie=$rows["declation"];
            }
            echo('
                <br />
                <br />
                <form name="frm" method="post" action="index.php?act=sm"> <p id="auto" >
                    Word : <input id="searchField" type="text" name="searchField" /> <input id="for-submitbutton" type="submit" name="sbm" value="Definition" />
                </p> </form> ');
            echo('<div class="answer">');
            print $word ;
            echo('<br><p id="dev">');
            print $vie;
            echo ("</h4><br></p></div>");
        }
    }
 ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:08:22+00:00Added an answer on June 12, 2026 at 11:08 am
    1. The complete syntax for $.post() is:

      $.post(url, data, callback, type);
      
    2. In your case:

      $.post("example.php", null,  function() {});
      

    If you want to send some parameters, use {param1: "123", param2: "123} instead of null.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
I have an issue about writing HTML file with PHP. I have this function
I have this html file where I want to overlay some text over another.
This would be a HTML file: <li class=msgln>hello</li><li class=msgln>hi</li><li class=msgln>hey</li> And php script: $fp
I'm generating an HTML file for an app, and in this HTML file there's
I came accross this html multiple file upload tutorial: http://robertnyman.com/2010/12/16/utilizing-the-html5-file-api-to-choose-upload-preview-and-see-progress-for-multiple-files/ I'm new to web
I have nav code like this in my HTML file: <div id="center_links"> <ul> <li><a
I have this tag into my html file: {{block:my_test_block}} {{news:my_test_block2}} I need to parse
I have html-file. I have to replace all text between this: [%anytext%]. As I
Here are the problem scripts: This is from the HTML file: <script type=text/javascript> var

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.