[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Add a "Loading Modal" to a search

Posted on 2014-01-14
3
Medium Priority
?
285 Views
Last Modified: 2014-01-15
I can't figure out how to show my "loading" modal within this block of code so that any time the form is submitting the loading will come up.

Where would this:

$("#searchLoader").show();

Open in new window


go in the code below so that everytime the search is submitted the searchLoader appears in modal.

var bindSearchSubmit = function() {
	$('form[name="searchform"]').submit(function(e){
		e.preventDefault();
                    var frmData = $(this).serializeJSON(),
			       postdata = {
				method: "getBindersBySearchCriteria",
				returnFormat:"json",
				DSN: cfrequest.dsn,
				InstanceId: cfrequest.instanceId,
				xJLLISUserId: cfrequest.xJLLISUserId,
				oFormData: $.extend({},frmData,{countonly:1}),
				PageSize: 10,
				cachebuster: new Date().toString()
			};
		postdata.oFormData = $.toJSON(postdata.oFormData);

Open in new window

0
Comment
Question by:traport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39780668
After
$('form[name="searchform"]').submit(function(e){
0
 

Author Comment

by:traport
ID: 39781924
Thank you so much. As it turns out I listed the wrong submit block... It's after the form "linktoSelectForm" is submitted. Thank you for your help. I'm sorry.

var searchLinkToList = function(idlist){
		var idlist = (typeof idlist === 'undefinded' || idlist === "") ? cfrequest.instanceId : idlist,
			$modal = $('.linkToOrgSearchListModal'),
			$form = $("#linktoSelectForm"),
			tabname = $("input[name=tabname]", $form).val(),
			requestData = {
				linkentitytype: $("input[name=linkentitytype]", $form).val(),
				entityid: $("input[name=entityid]", $form).val(),
				entitytype: $("input[name=entitytype]", $form).val(),
				callback: $("input[name=callback]", $form).val(),
				copsectionid: $("input[name=copsectionid]", $form).val(),
				copsectionexpanded: $("input[name=copsectionexpanded]", $form).val(),
				tabname: tabname,
				tieridlist: idlist
			};

Open in new window

0
 

Author Closing Comment

by:traport
ID: 39782447
I posted the wrong block but based on response was able to figure out placement in new block. Thanks so much.
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question