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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:44:27+00:00 2026-06-08T02:44:27+00:00

I tried to submit my form with a button and everything worked (the controller

  • 0

I tried to submit my form with a button and everything worked (the controller was call and the POST worked fine). Then I add a checkbox right next to it, and it returns a blank page with only the checkbox on it when I click it.
Im using:

<script src="@Url.Content("~/Scripts/jquery-1.4.4.js")" type="text/javascript"></script> 
<script src="@Url.Content("~/Scripts/jquery.unobtrusiveajax.js")"type="text/javascript"></script> 

Part of my views (im using partial view):
Index.cshtml:

<td id="ProjectFieldset">
     @Html.Partial("_ProjectSelect") 
</td>

_ProjectSelect.cshtml :

@using (Ajax.BeginForm("test", "Project", new AjaxOptions() { InsertionMode = InsertionMode.Replace, UpdateTargetId = "ProjectFieldset" }))
         {
        <td>
            @Html.CheckBox("ckboxItem", true , new {onchange="this.form.submit();"})
            <input type="submit" value="allo" id="allo" />
        </td>
         }

Controller:

[AcceptVerbs(HttpVerbs.Post)]
    public ActionResult test(bool ckboxItem)
    {
        ViewData["projects"] = db.Projects;
        return PartialView("_ProjectSelect");
    }

This is just a part of my code. There is no HTML error.
So, the checkbox and the button are well displayed, and when press the button, everything works. When I click the checkbox, it goes in the controller, but after that, it display a blank page. Any help here ??? Thks.

  • 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-08T02:44:28+00:00Added an answer on June 8, 2026 at 2:44 am

    Replace:

    <script src="@Url.Content("~/Scripts/jquery.unobtrusiveajax.js")"type="text/javascript"></script> 
    

    with:

    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")"type="text/javascript"></script> 
    

    Notice the typo that you have in your jquery.unobtrusive-ajax.js script name.

    Also jquery 1.4.4 is kinda old now. I would recommend you using a more recent version.

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

Sidebar

Related Questions

I have tried to replace the submit button of a form with an ajax
I need the button submit to be disabled unless JavaScript is on. I tried:
I got a form that I submit and then Id like to have the
I have a form with two buttons, a submit button and a cancel/close button.
I have two forms and a button. Everything works fine in Firefox. I get
I tried to do some form (just submit data) . Application I'm write in
Have a php form with an image for the submit button. Am trying to
I want to upload picture from my_form in jQuery, I tried submit() function it
I don't want to submit this app to AppStore. I've tried for many times
I am trying to call a jquery function on clicking a button 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.