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

  • Home
  • SEARCH
  • 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 6950683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:07:21+00:00 2026-05-27T14:07:21+00:00

I need help with jQuery and ajax. need to load textarea content from file

  • 0

I need help with jQuery and ajax. need to load textarea content from file after submit.
can’t figure out this. here’s the code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
  <style type="text/css">
/*<![CDATA[*/
    #output {
        resize: none;
        width:100%;
        height:70%;
    }
    #time {
        background-color:#0F0;
    }
    #command {
        width:80%;
    }
    #submit {
        width:18%;
    }
  /*]]>*/
  </style>
  <script type="text/javascript" src="jquery.js">
</script>
  <script type="text/javascript">
//<![CDATA[
            $(document).ready(function () {
                var psconsole = $('#output');
                psconsole.scrollTop(
                psconsole[0].scrollHeight - psconsole.height());
            });

            $(document).ready(function () {
                $("#execute").validate({
                    debug: false,
                    rules: {
                        name: "required",
                        email: {
                            required: true,
                            email: true
                        }
                    },
                    messages: {
                        name: "Please let us know who you are.",
                        email: "A valid email will help us get in touch with you.",
                    },
                    submitHandler: function (form) {
                        // do other stuff for a valid form
                        $.post('ajax.php', $("#execute").serialize(), function (data) {
                            $('#output').html(data);
                        });
                    }
                });
            });        
  //]]>
  </script>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />

  <title></title>
</head>

<body>
  <textarea readonly="readonly" cols="150" id="output">
<?php 
    echo $api->consoleOutput(50, 0); ?>
</textarea>

  <form action="" name="execute" method="post" id="console">
    <input type="text" id="command" name="command" /> <input type="submit" id="submit"
    value="si&Aring;&sup3;sti" /> <button id="button">siusti</button>
  </form><?php 
      $api->sendCommand($_POST['command'])
      ?>
</body>
</html>

all the other methods I have tried, the doesn’t seem to help…
Stackoverflow rules for fast answers 😉

  • 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-05-27T14:07:22+00:00Added an answer on May 27, 2026 at 2:07 pm

    Your form ID is “console”, not “execute” so change this line:

    $("#execute").validate({
    

    To this:

    $("#console").validate({
    

    You can also select the form by its name, but can’t see any advantage in this.

    Edit: in order for all of this to work, you also have to reference the plugin itself, usually named jquery.validate.js.

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

Sidebar

Related Questions

Need your help, trying to change this script: https://github.com/MrHus/jquery-monthly-ical To load external JSON data
I need help to use jConfirm with this existing code (php & Jquery &
Need help writing a script downloads data from google insight using c# this is
Need basic help using JQuery and AJax. I have an ul <div id=topics> <h1><a
I am hoping that someone can help me. I have found this jquery script
How can I use jQuery UJS to submit a form after the change event
I really hope someone can help with this problem. I have an ajax pagination
I'm using Ajax to load data. With help of jQuery jTemplates I load data
Hello i need the code from http://www.w3schools.com/ajax/ajax_database.asp rewritten in jquery(if possible) but more important
I need some help with jQuery script again :-) Just trying to play with

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.