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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:56:14+00:00 2026-05-19T21:56:14+00:00

Having trouble setting up a website for my wedding. Hope someone can find out

  • 0

Having trouble setting up a website for my wedding. Hope someone can find out what the problem is before the big day 🙂

The following code is working on my dev machine but once I publish it to my server, it does the postback and then imediatly after performs a GET request. The GET request should not happen.

I’ve got some basic set up code

$.ajaxSetup({
        beforeSend: function (xmlHttpRequest) {

//Used by the server to determine an async request
            xmlHttpRequest.setRequestHeader('X-Requested-With', 'jQuery');

            $.blockUI({ message: '<h3>Please wait...</h3>' });
        },
        complete: function (XMLHttpRequest, textStatus) {
            $.unblockUI();
        }
    });

And here is the code that binds to the anchor tag. Note that I’ve also tried this on button and input elements with no luck.

$('.basket-btn').click(function (src) {

        src.preventDefault();

        var form = $(src.target).closest('form');

        /* If the form contains validatable elements, then set this to false so the validation function is triggered. */
        var doWeValidate = !form.find('span[id$=_validationMessage]').length > 0;

        if (doWeValidate || !Sys.Mvc.FormContext.getValidationForForm(form[0]).validate('submit').length) {

            var destination = $(src.target).attr('data-destination');

            $.post(form.attr('action'), form.serialize(), function (data) {

                $("#" + destination).html(data);
            });
        }
    });

Here is my site if you want to see the problem I’m talking about.

http://www.vinceandjeanswedding.com/GiftRegistry/

If you enter an amount and click contribute, it will perform a postback and then (according to firebug) a GET request will follow straight after.

Please help me.

  • 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-19T21:56:15+00:00Added an answer on May 19, 2026 at 9:56 pm

    I worked this out.

    I noticed that in firebug, the first requrest always returned a 302 Object Moved error.

    Simply placing a forward slash on all my requests fixed the problem.

    So instead of http://www.site.com/Home it is now http://www.site.com/Home/

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

Sidebar

Related Questions

I am having trouble setting and echoing out a cookie, I was wondering if
I'm having trouble setting up PDO in my website framework. I open my connection
I am having trouble setting up the configuration of Spring.Net so that I can
I'm following the guidelines for plugin authoring on jquery's website, but I'm having trouble
I'm having trouble setting up the Android SDK. I've set up Eclipse before but
I am having trouble setting up this Dynamic Linq Library so i can use
I am having trouble setting my ContentProperty to Text. The error I am given
I'm having trouble setting up my svn. I used apt-get install subversion to install
I'm having trouble setting the command-line arguments in Eclipse. I've searched around the Internet
I'm having trouble setting the path to a DLL that is not in 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.