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 8085665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:11:59+00:00 2026-06-05T18:11:59+00:00

#!/usr/bin/perl print Content-type: text/html \n\n; print qq(<html> <head> <script type=text/javascript src=/jquery.js></script> <script> jQuery(document).ready(function(){ jQuery(#form_lang).submit(function(e){

  • 0
#!/usr/bin/perl
print "Content-type: text/html \n\n";
print qq(<html>
<head>
<script type="text/javascript" src="/jquery.js"></script>
<script>
jQuery(document).ready(function(){
jQuery("#form_lang").submit(function(e){

    var str = jQuery(this).serialize();
    alert("dfdaf"); 
    jQuery.ajax({
        type: "POST",
        url:"contacts.pl",
        success: function(){
        jQuery("#note").ajaxComplete(function(event, request, settings){
                    if(msg == 'OK') 
                            alert("Your message!");
                });
            },
          });
});
});
</script>
</head>

Here is the form part :

<form id ="form_lang" action="helloworld.pl" method="POST">
<p>Enter Language: </p>
<input type="text" id="lang" name="lang"  /><br/>
<p>Enter Description: </p>
<textarea id="lang_desc" name="lang_desc"  ></textarea><br/>
<input type="submit" value="submit"  />

Here the control goes upto alert(“dfdaf”).And after that it’s being submitted to helloworld.pl…The contacts.pl isnt being referred..Y is that?? how to make a call then ?
Thanx in advance

  • 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-05T18:12:01+00:00Added an answer on June 5, 2026 at 6:12 pm

    When you submit the form, the submit event will fire. That will trigger the submit handler, which will start the Ajax request.

    The browser will then submit the form as normal (because nothing is stopping it).

    The browser will load a new page, and remove the environment in which the JavaScript was running. The Ajax will be cancelled (it is possible that the request might get through to the server, but the response won’t be processed by the browser).

    If you want to do stuff when the form is submitted, then do it in helloworld.pl

    Use Ajax when you want to communicate with the server without leaving the page.

    (You could also cancel for the form submission, then use JS to resubmit it when the Ajax request comes back … but that is overcomplicated and inefficient).

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

Sidebar

Related Questions

in the html file: <!--#exec cgi=/cgi-bin/test.pl--> the perl script: #!/usr/bin/perl print Content-Type: text/html\n\n; print
I am trying to run this script mail.pl #!/usr/bin/perl print Content-type: text/html \n\n; #HTTP
I have a perl.cgi file which has the content: #!/usr/bin/perl print Content-type: text/html\n\n; print
I have run this Perl code: #!/usr/bin/perl print content-type: text/html \n\n; print Hello World.\n;
I am using the following script: #!/usr/local/bin/perl -wT use strict; use warnings; print Content-type:
#!/usr/bin/perl use File::Copy; use File::Copy::Recursive; $old_folder=$ARGV[0]; $new_folder=$ARGV[1]; $folder_loc=$ARGV[2]; print Content-type:folder rename\n\n; #rename($arg1,$arg2) || print
I have a Perl script called replaceUp: #!/usr/bin/perl search=$1 replace=$2 find . -type f
Why do I need to put \n twice after Content-Type: text/html with Perl, but
!/usr/bin/env perl use warnings; use strict; my $text = 'hello ' x 30; printf
I've got this simple Perl script: #! /usr/bin/perl -w use strict; use Data::Dumper; my

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.