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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:35:27+00:00 2026-05-27T03:35:27+00:00

I have an ajax and full request in the same form. A mouse click

  • 0

I have an ajax and full request in the same form. A mouse click fires the ajax in the input field and if I press enter on the same input field right after the mouse click then a nasty error pops up which is shown below.

“The Http Transport returned a 0 status code. This is usually the result of mixing ajax and full requests. This is usually undesired, for both performance and data integrity reasons.”

In my case the input field is a radio button which uses ajax. Pressing enter is causing a full request.
I used BalusC’s Javascript function which has event.stopPropagation() which worked for me and it was for a text input field. It also worked for a drop down list.
But the same event.stopPropagation() is not working for a radio button.
You can check BalusC’s answer for reference.

Below is my piece of code which doesn’t seem to work

<h:form id=blah...... onkeypress="enterToChange(event)">
....
</h:form>

The Javascript function

function enterToChange(event){
if (event.keyCode==13 && event.target.id.match('radiobutton_id'){
event.stopPropagation(); // Don't bubble up.
event.preventDefault();  // Prevent default behaviour (submitting the form).
event.target.onchange(); // Trigger onchange where key was actually pressed.
}
}

I used firebug to see that the statements in the if clause are executed but the error still pops up for some reason and immediately the whole page is rendered. I need to avoid the error in any case.

Any answer is highly appreciated.
Thanks

  • 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-27T03:35:28+00:00Added an answer on May 27, 2026 at 3:35 am

    Enter is bound to submit. So if the event keyCode is 13 and event target id matches that of the radio button, then the onclick event for the submit button should fire a JS function which returns false.

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

Sidebar

Related Questions

I have a stupid problem. An jQuery.ajax request return me a full HTML text
I would like to have Ajax form in Rails so i'm using form_remote_tag. The
I have some AJAX work that brings across an additional form element that I
Greetings, I have a jqueryui autocomplete input that uses an ajax call to populate
I have 2 questions : If i send the ajax request to self page
I have a jQuery ajax script to process a form on submit. However, I
I have a form in a view which performs ajax partial processing for autocompletion
I have an auto-complete input where visitors enter a location and it provides suggestions
I am working on an ASP.Net Full-Ajax site. Because all operations have doing by
I have ajax code for asp.net (non-mvc) to call to a webMethod to get

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.