Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss... ModelState makes Jquery not work ModelState makes Jquery not work
Previous
 
Next
New Post
5/12/2016 2:24 AM
 

2 buttons in view. the one is inquiry info. and another is to submit data

I have found the question that  inquiry button use Jquery does not work(nothing happen when click it) when I click submit button to validate textbox firstly. 

but it is works when first click inquiry button.

Please give me help.  Thanks

Jquery code:

  $('#mvcContainer-@Dnn.ActiveModule.ModuleID .btn-rmasearch').click(function () {

        dnnModal.show('@Url.Action("Search", "Rma")?popUp=true&CustId=' + cid + "&SerialNumber=" + sn + "&KeyN=" + id, false, 350, 750, false);

    });

 

action code:

//inquiry

  public ActionResult Search(SearchCriteria criteria)

        {

            if (criteria.CustId == 0 || string.IsNullOrWhiteSpace(criteria.SerialNumber))

                return Content("Nothing have been request.");

            var invoices = InvoiceService.GetInvoices(criteria);

            invoices.KeyN = Request.QueryString["KeyN"];

            if (invoices.Count == 0)

                return Content("Nothing have been found");

 

            return View("RequestSearch", invoices);

        }

 

//submit

 [HttpPost]

        [ActionName("Request")]

        [DotNetNuke.Web.Mvc.Framework.ActionFilters.ValidateAntiForgeryToken]

        public ActionResult RmaRequest(RmaSetting RmaRequest)

        {  if (ModelState.IsValid)

                {

                    string newRefID = RmaService.PostRMA(RmaRequest, Request.QueryString["code"]);                    

                    if (!string.IsNullOrEmpty(newRefID))

                    {

                        RmaRequest.RefID = newRefID;

                        return View("RequestProcessItems", RmaRequest);

                    }

                }

                else

                {

                    ViewData["dropDownListRequest"] = ShowDDL1();

                    ViewData["dropDownListProblem"] = ShowDDL2();

                    ViewData["dropDownListStates"] = ShowDDL3(Country);

                    return View("Request",RmaRequest);

                }

}

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss... ModelState makes Jquery not work ModelState makes Jquery not work


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out