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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:07:41+00:00 2026-06-04T15:07:41+00:00

I am having some issues with the jQuery Ajax function and PHP. I am

  • 0

I am having some issues with the jQuery Ajax function and PHP.

I am checking the existance of the nav key in the $_REQUEST variable in PHP with code such as this:

if ($_REQUEST['nav']) {
    // do something
} else {
    echo 'Please specify NAV.';
}

However the above expression never evaluates as nav is never passed to it and always outputs ‘Please specify NAV.’

console.log('paramList: ' + paramList);

$.ajax({
    type: 'POST',
    url: '/admin/nav_builder/edit.php?act=save&nav_id=<?php echo $nav_id; ?>',
    data: {'nav':paramList},
    dataType: 'json',
    error: function(xhr, err) {                             
        loadLayout();
        hideLoader();
        hideLoaderPalette();
    },
    success: function(data){
        $('.errorMsg').html(data.html);
        hideLoader();
        hideLoaderPalette();
    }
});

Using the Firefox Firebug plugin I can see that paramList does indeed hold a value, this is:

paramList:
{“section0”:{“elem0”:{“nav_palette”:”text”,”nav_name”:”fdgfdgdfg”,”nav_url”:””},”elem1″:{“nav_palette”:”category”,”c_id”:”226″}}}

I can’t see for the life of my why nav is not being passed to the URL provided to the ajax function.

  • 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-04T15:07:42+00:00Added an answer on June 4, 2026 at 3:07 pm

    Try to print first if the “nav” parameter if it has a value.

    echo $_REQUEST['nav'];
    

    The other one is that you have used two method in one request.

    Just try the following.

    $.ajax({
        type: 'POST',
        url: '/admin/nav_builder/edit.php',
        data: {act:'save', nav_id:'<?php echo $nav_id; ?>', nav:paramList},
        dataType: 'json',
        error: function(xhr, err) {                             
            loadLayout();
            hideLoader();
            hideLoaderPalette();
        },
        success: function(data){
            $('.errorMsg').html(data.html);
            hideLoader();
            hideLoaderPalette();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some issues with a jQuery AJAX call. My code works fine when
I'm having some issues with some jQuery code, and I'm hoping and thinking that
I'm having some issues with my code maybe you could help? Jquery: [updated] <script>
I am having some issues returning data from on page, using jQuery, PHP and
I am having some issues with Microsoft Explorer 6/7 and the jQuery clone function.
I'm having some serious issues with the jQuery UI icons and I can't see
I'm having some issues with an asp.net implementation of this JQuery facebook style autocomplete
I'm having some issues with my code. This is probably due to some design
I am having some issues with logging. After reviewing JBoss Seam source code, I
I'm working with forms inside jQuery Dialog, and am having some issues with the

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.