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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:18:35+00:00 2026-06-07T14:18:35+00:00

Hey guys I’m not getting any post data coming out here, and am pretty

  • 0

Hey guys I’m not getting any post data coming out here, and am pretty positive this isn’t working at all. The big deal was it firing a accept/deny with an id # attached, and a value for that forms checkbox. I’m getting no errors, and no warnings so am having an issue stepping through it =( Hopefully another set of eyes?

Sorry ahead of time I know my JQuery blows.

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
        google.load("jquery", "1.6");
    </script>

    <script>
        $(".audit").submit(function() 
            { 
                return false; 
            });

        $(".accept, .deny").click(function(event) 
            {
                $form = $(this).parent("form").get(0);
                $gruden = $form(function(index) { attributes.push($(this).val());});
                $.post($form.attr("action"), $form.serialize() + "&submit=" + $(this).attr("value") + "&gruden=" + $gruden, function(data) {

                console.log(data);

            });
        });
    </script>

.......................

<?php foreach($obj->photos as $pending) { ?>

        <div class='container' id='photo-<?=$pending->id;?>'>

            <span class='shadow'>
            <a href='/<?=$pending->large;?>'><img src='http://<?=$_SERVER['HTTP_HOST'].'/'.$pending->small;?>'/></a>
            </span>

            <form class='audit' name='audit-<?=$pending->id;?>' action='<?=$_SERVER['PHP_SELF'];?>'>
            <div class='box'>

                <ul>

                    <li>ID:   <?=$pending->id;?></li>
                    <li>Date: <?=$pending->created_at;?></li>
                    <li>User: <?=$pending->fb_id;?></li>
                    <li>&nbsp;</li>

                    <li>

                        <input class='gruden' value='gruden-<?=$pending->id;?>' type='checkbox' />
                        <a name='submit' value='accept-<?=$pending->id;?>' class='accept' href=''></a>
                        <a name='submit' value='deny-<?=$pending->id;?>' class='deny' href=''></a>

                    </li>

                </ul>

            </div>
            </form>

        </div>

<?php } ?>
  • 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-07T14:18:37+00:00Added an answer on June 7, 2026 at 2:18 pm

    I think I see your problem now. I’ve re-written your code so it makes more sense. Comments to explain what’s going on

    <script>
        $(".audit").submit(function(){ 
                return false; //Preventing the form from submitting if someone hits Enter
        });
    
        $(".accept, .deny").click(function(event) {
                var form = $("form.audit"); //Always use var to declare variables in Javascript. It's not PHP; we don't use $, unless you want it to be a part of the variable name. Also fixed your selector
                var gruden = $form(function(index) { attributes.push($(this).val());}); //Are you trying to find out if the checkbox with class gruden is checked? Please answer in the comments so I can correct this line
                $.post(form.attr("action") + "&submit=" + $(this).attr("value") + "&gruden=" + gruden, form.serialize(), function(data) { 
                       console.log(data);
                }); //I assume that you want to pass submit and gruden as GET params here, since you're appending them to the URL. If you want them to go as POST vars, then let me know in the comments
        });
    </script>
    

    No offense, but I think you might benefit from reading a bit more about Javascript and jQuery. At least read up on how selectors work in jQuery, and some basic Javascript syntax

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

Sidebar

Related Questions

Hey Guys, here is my code for this, the only help i get from
Hey guys, hope this isn't too much of a n00b question I'm mainly a
Hey guys i dont know what i'm doing wrong here. www.example.com/data/stuff1/stuff2/stuff3 to www.example.com/anything.php?par1=data&&par2=stuff1/stuff2/stuff3 And
Hey guys, I always get confused by this so it's not exactly my strong
Hey guys, I'm just starting out with GWT and am getting the following error
hey guys having this really simple problem but cant seem to figure out have
hey guys was hoping you could help me out, Not sure if I always
Hey guys was hoping you can help me out. been at this for like
Hey Guys I'm running this little function here function getBeaches() { $request=Slim::getInstance()->request(); $args=filter_var_array(func_get_args(),FILTER_SANITIZE_STRING); $sql=SELECT
Hey guys, I want to store a categorized list of URLs. This is an

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.