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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:50:42+00:00 2026-06-13T23:50:42+00:00

Hey guys this is pretty simple – I ran across a cool MVC example

  • 0

Hey guys this is pretty simple – I ran across a cool MVC example at Adam Wulf’s site and I’m trying to get a grip with how all the different pieces interact… Within the model.js he has two different ways of using the *data : * setting. Can someone please explain the differences between the two of them, and maybe an example of a different method? Code:

       $.ajax({
            url: 'ajax.php',
            data : { load : true },
            type: 'GET',
            dataType: 'json',
            timeout: 1000,
            error: function(){
                that.notifyLoadFail();
            },
            success: function(data){
                loadResponse(data);
                that.notifyLoadFinish();
            }
        });

Vs this example:

       $.ajax({
            url: 'ajax.php',
            data : { load : true, id : id },
            type: 'GET',
            dataType: 'json',
            timeout: 1000,
            error: function(){
                that.notifyLoadFail();
            },
            success: function(data){
                loadResponse(data);
                that.notifyLoadFinish();
            }
        });
  • 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-13T23:50:43+00:00Added an answer on June 13, 2026 at 11:50 pm

    It’s simply an anonymous object used to pass values to the server. In the first example, it contains a single value, “load”:

    data : { load : true }
    

    In the 2nd, it has two values:

    data : { load : true, id : id }
    

    …”load” and “id”. Take the 2nd example: the server will receive two parameters for the request. In PHP for example, you’d retrieve them with:

    $id = $_GET['id'];
    $load = $_GET['load'];
    

    Make sense?

    Cheers

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

Sidebar

Related Questions

Hey guys i'm trying to convert url which looks like this example.com/sometype/author-name/sort-date or example.com/sometype/author-name/sort-date/something-value/
Hey guys, this should be quite simple to answer.... Im using XSB Prolog...trying to
Hey guys this should be simple, I'm just not seeing it, I would like
hey guys having this really simple problem but cant seem to figure out have
Hey guys I am getting this exception when trying to run the query Column
Hey guys, this is simple but I can't make it workn... blah! I have
hey guys, this might be really stupid, but hopefully someone can help. I'm trying
Hey guys, im trying to insert some checkboxes into a database and im pretty
Hey guys I feel like this is a simple question, but I don't know
Hey guys I'm trying to identify this javascript image gallery viewer on Tumblr, I

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.