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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:56:17+00:00 2026-05-25T17:56:17+00:00

The script called New script is suppose to output 2 integer variables anchor and

  • 0

The script called New script is suppose to output 2 integer variables anchor and signed.

I would like to replace Old script with New script, but as you can see, they are very different.

Question

How do I submit/post anchor and signed in New script?

New script

$(window).load(function() {

    $('form').delegate('input:submit', 'click', function() {
        var anchor = this.name;
        var checkboxState = $('#' + anchor).find('input:checkbox').is(':checked');

        var signed = 0;
        if (checkboxState == true) {
            signed = 1;
        }

        alert(anchor + ' ' + signed);

        return false;
    });
});

Old script

// sends the form content to server side, and stay on page
$('form').live('submit', function() {

    $.post($(this).attr('action'), $(this).serialize(), function(response) {
        // do something here on success
    }, 'json');

    // don't redirect
    return false;
});

HTML

<form action="/cgi-bin/receiver.pl" method="post">
  • 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-25T17:56:18+00:00Added an answer on May 25, 2026 at 5:56 pm

    Put this

    $.post($(this).prop('action'), {anchor: anchor, signed: signed}, function(response) {
       // do something here on success
    }, 'json');
    

    in place of alert

    Here is the proper one, and running ok.

    http://jsfiddle.net/ergec/pJgyu/16539/

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

Sidebar

Related Questions

I'm using the following script to request new content to a file called index.html:
I have a Perl script called replaceUp: #!/usr/bin/perl search=$1 replace=$2 find . -type f
Let's say I have a Bash script called foo.sh . I'd like to call
Suppose I have a python script called my_parallel_script.py that involves using multiprocessing to parallelize
When I call a Powershell script, how can I keep the called script from
Hey I'm new to PHP so would really like your insight on how I'm
I have a fairly simple script but something is going wrong and I can't
I got this script called rapidshare link checker v2 php by Bigfish At the
Is there any way, from a PHP script called from mod_php with apache, to
I have a script in Bash called Script.sh that needs to know its own

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.