We help IT Professionals succeed at work.

AJAX

12K

Solutions

7K

Contributors

Asynchronous JavaScript and XML (AJAX) is a group of interrelated Web development techniques used on the client-side to create asynchronous Web applications. With AJAX, web applications can send data to and retrieve from a server asynchronously (in the background) without interfering with the display and behavior of the existing page. HTML and CSS can be used in combination to mark up and style information. The Document Object Model (DOM) is accessed with JavaScript to dynamically display and allow interaction with the information presented.

how can i send ajax call to database and retrieve a table having 5 columns data as json  and render in jsp to display .
0
Hi I m populating data like below in tabular foarmat . my requirement is like while submiting ajax call before that
each row which is cheked having 3 date field need to validate Q Date should greater then P Date ,
B Date sholud be greater then Q Date and P Date. pelase help me out with some code snippet.


<table align=center>

<tr>			<th>Check/UnCheck</th>
                <th>MYear</th>
                <th>P Date</th>
                <th>Q Date</th>
                <th>B Date</th>
</tr>
<%for(int i=0 ; i<mVector.size();i++)
{
	
%>
 <tr>
<td align="top">
<INPUT type="checkbox" class="chkValues" id="ckbCheckAll" name="chkBox" type="checkbox" data-row="row<%=i%>" value="" size="50">
</td>
<td align="left">
<input class="inputText row<%=i%>" type="text" name="mYear" id="mYear"  value="<%=mVector.elementAt(i)%>">
</td>

				<td>
		            <input class="date row<%=i%>" id="pDate<%=i%>" name="dob" type="text" value="<%=(oldValues.elementAt(0)==null?"":oldValues.elementAt(0))%>" />
				</td>
				<td>
		            <input class="date row<%=i%>" id="qDate<%=i%>" name="dob" type="text" value="<%=(oldValues.elementAt(1)==null?"":oldValues.elementAt(1))%>" />
				</td>
				<td>
		            <input class="date row<%=i%>" id="bDate<%=i%>" name="dob" type="text" value="<%=(oldValues.elementAt(2)==null?"":oldValues.elementAt(2))%>" />
				</td>

</tr> 
<%}%>

</table>

Open in new window



ajax call is like below


$(document).ready(function() {

	$(".date").datepicker({dateFormat:'dd/mm/yy'});
	

	$('.chkValues').on('click', function() {

		//get values of dates
		var array = [];
		$row = $(this).data('row'); //row1, row2, row3 etc
		$('input.' + $row).each(function() {
			array.push($(this).val());
		});
		$('#btnSubmit').click(function(evt) {
    	evt.preventDefault();
    	$.ajax({
            type: "POST",
            url: "Test.jsp",
            data: {array : array},
            success: function(responseFromServer) {
            	 $.each(responseFromServer, function(resultMessageKey,resultMessageValue) {	
                    $('#content').html(resultMessageKey);
                });
    	    	//getClearDateValues();
    		
            },
            error: function() {
                alert(" Ajax call Failed to Update Values  into Database ");
            }
        }); 
		});

	});

});

Open in new window

0
Hi In below function i m calling one validate function save()
if save() execute and give all values validated then ajax call go
other wise ajax call don't go . in below code save function is working
perfectly but when it gives no validation error ajax call is not going.
please help me out to recify this.


$(document).ready(function() {
	$("#save_data").click(function(evt) {
		evt.preventDefault();
		alert("succeess");
		if (save()){
			$.ajax({
				url: "Test.jsp",
				type: "post",
				data: {
				pS:$('#pS').val(),
				psT:$('#psT').val(),
				pC:$('#pC').val(),
				mY:$('#mY').val(),
				pDate:$('#pDate').val(),
				pdDate:$('#pdDate').val(),
				bDate:$('#bDate').val()},
				success: function(responseFromServer) {
	            	$.each(responseFromServer, function(resultMessageKey,resultMessageValue) {	
	                    $('#content').html(resultMessageKey);
	                });
	                //$('#content').html("Date Confguration Saved");
	    	    	//getClearDateValues();
	    		
	            },
	            error: function() {
	                alert(" Ajax call Failed to Update Values into Database");
	            }
			});
		}
	});
});

Open in new window

0
Hi i am sending ajax request to java servlet on success ia m prining the response to servlet and sending back as ajax response
but after executing it gives error like below -

jquery-1.9.1.min.js:3 Uncaught TypeError: Cannot use 'in' operator to search for '72' in


{"Request Processed":"Request Processed"}
0
How can i reload the page with success message when ajax response will get from java controller .
Case - i am sending an ajax request to java controller it is successfully going to java controller i am setting a response in controller and revert it back to jsp . while success i want to reload the page with success message which i already set in java controller.
0
Hi,

I am getting CORS error in my website. Even though I am getting status 200 in network tab as CORS was allowed for the domain.

jquery-2.1.4.min.js:4 Access to XMLHttpRequest at 'https://authuat.mysite.com/api/users' from origin 'http://etgsit.hrt.uyetr.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

In Nework tab, I am getting status 200 for the API https://authuat.mysite.com/api/users as CORS was allowed for domain
http://etgsit.hrt.uyetr.com

Code as below:
$.ajax({
        url: 'https://authuat.mysite.com/api/users',
        type: 'GET',
        xhrFields: { withCredentials: true },
        accept: 'application/json',
        async: false
    }).done(function (data) {

        console.log(data);

    })
        .fail(function (jqXHR, textStatus, error) {

            console.log('falied');
        });

Open in new window


Please advise on this.

Regards,
0
Requirement Description Imagehow can i send dynamically created fields through ajax to servlet?

i have a jsp page where i fetch data from a table and display there are 3 date fields

all row having checkbox when i click on chekbox new date value should go to servlet through ajax.
code are below -

<table align=center>

<tr>			<th>Check/UnCheck</th>
                <th>MYear</th>
                <th>Date1</th>
                <th>Date2</th>
                <th>Date3</th>
</tr>
<%for(int i=0 ; i<mYearVector.size();i++)
{
	
%>
 <tr>
<td align="top">
<INPUT type="checkbox" class="chkValues" id="ckbCheckAll" name="chkBox" type="checkbox" value="" size="50">
</td>
<td align="left">
<input class=inputText type="text" name="mYear" id="mYear"  value="<%=mYearVector.elementAt(i)%>"  readonly>
</td>

				<td>
		            <input class="date1" id="payrollCutOffDate<%=i%>" name="dob" type="text" value="<%=(oldValues.elementAt(0)==null?"":oldValues.elementAt(0))%>" />
				</td>
				<td>
		            <input class="date2" id="payrollPaymentDate<%=i%>" name="dob" type="text" value="<%=(oldValues.elementAt(1)==null?"":oldValues.elementAt(1))%>" />
				</td>
				<td>
		            <input class="date3" id="inactiveDate<%=i%>" name="dob" type="text" value="<%=(oldValues.elementAt(2)==null?"":oldValues.elementAt(2))%>" />
				</td>
</tr> 
<%}%>

</table>

Open in new window

0
I have an ajax call within a function and when I return the result of the ajax call from the function it comes back undefined, what am I doing wrong here ?
	function get_applications(){
		var application_list = "";
		
		$.ajax({
			url: '../ajax/some_file.php',
			contentType: false,
			processData: false,
			type: 'POST',
			success: function(data){
				application_list = data;
			//	console.log(data);
			},
			error: function() { 
			//	console.log('NOT updated'); 
			}			
		});
		return application_list;
	}

Open in new window

0
I have a login script, instigated by a button in the header that calls up a form in a modal window which, on submit, processes  using jQuery AJAX, On successful login, the script returns to the original page, where it calls up another modal window with utilities only available to the logged in user. I have tried using a query variable, and I have also tried using a global but, for some reason, both fail.

Code has been working fine to just log the user in and return to the page. The page name is held in a PHP variable:
$CurrentPage = empty($_REQUEST['CurrentPage']) ? $_SERVER['HTTP_REFERER'] : $_REQUEST['CurrentPage'];

Open in new window


In the AJAX result I have tried using the following to attach a query string.
<?PHP
echo('window.location.href = "'.$CurrentPage.'?ET=1";');
or
echo('window.location.search("'.$CurrentPage.'"+"?ET=1");');
echo('window.location.search("'.$CurrentPage.'?ET=1");');
?>

Open in new window

The page needs to reload in order to show the user is logged in in the header.
When I could not get the query to work, (The string does not appear) I tried using a global variable:
<script>
window.ETSHOW = "Active";
<?PHP
echo('window.location.href = "'.$CurrentPage.'");');
?>
</script>

Open in new window


The code that contains the opening of the logged-in user utility menu is contained in the footer of the page, so I did this when attempting to use the query string:
<script>
<?PHP
if(!empty($_REQUEST[ET]))
{
   // Run function to clear the URL, then
   var hUrl    = "etselect.php";
   var hTitle  = "Utilities";
   var w       = 630;
   var h       = 630;
   LVPopup(hUrl,hTitle,w,h); // Opens the model window
}
?>
</script>

Open in new window

Attempting to use a global variable, I have done this:
<script>
if(typeof window.ETSHOW !== 'undefined' && window.ETSHOW != null) 
{
   ETSHOW = null;
   var hUrl    = "etselect.php";
   var hTitle  = "ExpressTRAX";
   var w       = 630;
   var h       = 630;
   LVPopup(hUrl,hTitle,w,h);
}
</script>

Open in new window

I've not used JavaScript globals much, but I do not understand why that is not working, and I am really puzzled that the query variable is not attaching to the URL.

Process Order
(Header and Footer are includes that appear on every page - But not in the modal windows)
  1. User selects the Login button in the header. This opens a login form in a js modal window.
  2. Form submit uses Ajax to authenticate the login.
0
<form id="restaurantForm">
            <input type="text" id="name" class="req" placeholder="Restaurant Name" />
            <input type="text" id="address" class="req" placeholder="Address" />
            <input type="text" id="suite" placeholder="Suite"/>
            <button type="button" onclick="sendForm()">Done</button>
            <button type="button">Cancel</button>
</form>


I have this code doing an ajax post in jQuery

const sendForm = () => {
const name = document.querySelector('#name');
const address = document.querySelector('#address');
const suite = document.querySelector('#suite');
   
$.post('AddRestaurant.aspx', { name: name.value, address: address.value, suite: suite.value }, () => {
    $("#dbContent").html(html); } );

Since it's a post, how can I automatically grab the form field values like a normal form post submittal without having to add all of the form field values to the second arg of $.post? Basically, I want to put one value as the second arg of $.post, that will have all form fields and their values Do I have to make the button of type "submit" and then e.preventDefault() and then have to serialize the form results somehow and add the result as the second arg?
0
Hi,

I have page and on body tag I am calling the ajax call.
The process takes sometime. And I wanted to add loader to the page in the mean time loader process the request.

Please advise to add loader.

Thanks

</head>
<body><!-- <===== PLEASE NOTE THIS IS YOUR BODY TAG -->
<script>
    $.ajax({
        url: '/der/surface/userHasSession',
        data: { currURL: window.location.pathname + window.location.search },
        type: 'GET',
        xhrFields: { withCredentials: true },
        accept: 'application/json',
        async: false
    }).done(function (userdata) {
        console.log('Done');
    }).fail(function (jqXHR, textStatus, error) {
        console.log('Session Check Fail: ');
    });
</script>

Open in new window

0
HI,

I am working on .Net application using C#
I JQuery, I wanted that page should not render until my ajax function is not executed.
Please advise the solution
Code below:
$( window ).load(function() {
        
		$.ajax({
        url: '/der/surface/userHasSession',
        data: { currURL: window.location.pathname + window.location.search },
        type: 'GET',
        xhrFields: { withCredentials: true },
        accept: 'application/json',
        async: false
    }).done(function (userdata) {
       
			console.log('Done');


    })
        
        .fail(function (jqXHR, textStatus, error) {
            console.log('Session Check Fail: ');
        })
}
		
});

Open in new window

0
I have a PHP array
$D = array("Key1"=>"Value1","Key2"=>"Value2") etc.
I need to pass this to a PHP script using jQuery AJAX.
What is the best method to do this?
I know that json_encode should work, but not sure how to implement it in the data definition, which is also sending other variables
tried data: {Var1; "Value1", Var2: "Value2", DArray: <?PHP json_encode($D) ?>} (among other things)
0
Hello everyone,
I have been trying for some time to change an image loaded on my site and to distort it as follows the photo.
ajax or other but please, can you help me please?

Sans-titre-1.png
Thank you for your help !
0
Hi,

I have a PHP backend and admin can set to get notifications when some event occurred.
Notification setting are saved in DB
I could use JSON for now but later these notifications will be more elaborate so this is the reason why I'm saving this in DB.

All these notifications settings are saved into a DB and each notification have an ID
here is an example of the DB field
ID 1 Notification 1 - active Y/N - email address
ID 2 Notification 2 - active Y/N - email address
ID 3 Notification 3  - active Y/N - email address

On my Notification page each Notification have a form.
and send data using AJAX

I'm looking for a way to reuse the code for each notification when updating their data

each form have a form ID and a submit button
<button type="submit"  id="save" onClick="notificationUpdate();"> Save </button>

Open in new window


Ajax part that I whish for any notification, how can I pass / get form id element based on this model
function notificationUpdate(){

	var notificationDetail=Object();
				
		notificationDetail.notification_id=$("#notification_id").val();
		notificationDetail.notification_email=$("#notification_email").val();
		notificationDetail.notification_active=$('input[name=notification_active]:checked').val();
		
		$.post( 
			"ASEngine/ASAjax.php",
				{ notificationDetail_send: notificationDetail,action : "updateNotification" },
					function(result) {						
						//some code...
					}
		);		
}

Open in new window

0
I am working on an ajax image upload system using ajax and php.

Within the ajax code, I am using :

ajax.addEventListener("load", completeHandler.bind(imageSelected), false);

I'm binding the Image selected in the web page because I have several windows on one page, each of which I different image can be uploaded to

Later in:

function completeHandler(event){

Open in new window


I have noticed that using the following code

if (this=="Image1"){
 ... do something
}

Open in new window


works just as expected.

However, I would like to use a switch case statement.

If I use the following within the completeHandler code:

 
function completeHandler(event){

var imageBeingControlled;
var inactiveImages;

switch (this){

    case Image1:
    imageBeingControlled=1;
    break;

    case Image2:

    break;

    default:
  }
alert (imageBeingControlled);

Open in new window


the alert ALWAYS shows undefined. What am I doing wrong here. It seems that although 'this' is indeed Image1, the switch statement doesn't evaluate it as such and so variable 'imageBeingControlled' always returns undefined.

Please help, thank you
0
Hi,

1. I have an index page
2. I have a dialog window
3. I want to send data from my dialog window to the index page

I'm unable to send my data from the dialog box to the index page text editor.


index page: 

text editor 


   jQuery(function () {
            var maxLength4000 = 4000;
            $(document).on("keyup paste touchend", function () {
                var text = $("#ActionAttributesAndValues").val();
                var textlen = maxLength4000 - text.length;
                if (text.length > 4000) {
                    editorActionAttributesAndValues.value = text.substr(0, 4000);
                }
                $('#rcharsActionAttributesAndValues').text(textlen);

                if ($("#ActionAttributesAndValues").val() != '') {
                    $('#ValidateActionAttributesAndValues').hide();
                }
                else {
                    $('#ValidateActionAttributesAndValues').show();
                }
            });
            var editorActionAttributesAndValues = new Jodit("#ActionAttributesAndValues");
        });



  @Html.TextArea("ActionAttributesAndValues", new { @class = "form-control", @style = "width:77%" })

Open in new window




Dialog window: 

 $("#AppendAttributeToParentBtn").click(function () {
            debugger;

         // I want to populate the editor Attribute value to Attribute text editor. 
        // it's not working 

             var textareavalue = editorAttributeTextArea.value;
            alert(textareavalue);   //I'm getting the data from the text area but I'm unable to send my data to the index page where I have the editor for attribute text editor 

            editorActionAttributesAndValues.value = editorActionAttributesAndValues.value + '<br/>' + textareavalue;
          
 
        });

Open in new window

0
Hi,

I'm having problem sending "Json" data to a text editor

Can you please help?

 $("#SelectAFunctionFromList").change(function (event) {
            debugger;
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedFunctionID').val(GetValue);
            //reset select group
           // $('#FunctionTextArea').val("");
            var method = $('#FunctionPartialViewForm').attr("method").toLowerCase();
            var action = $('#FunctionPartialViewForm').attr("action");
            var data = $('#FunctionPartialViewForm').serialize();
            $.ajax({ method: method, url: action, data: data }).done(
                function (json) {

                  //Here I want to send my json data to my text editor called "FunctionTextArea" 
                    alert(json);
                    editor .value =  $("#FunctionTextArea").val(json);


                });
        });




      jQuery(function () {
            var editor = new Jodit("#FunctionTextArea");
        });

Open in new window

0
Hi,

i want to replace \n with </br>


 My original code is this: 

      var text = $("#ContidionsAndAttributesTextArea").val());
            alert(text); 
            editor.value = editor.value + text;


but I want to replace \n with <br/> 

            var text = $("#ContidionsAndAttributesTextArea").val().replace("\n", "<br />", "g");     //it's only replacing the first \n but not any \n found in the field
            alert(text); 
            editor.value = editor.value + text;

Open in new window


my output text is this:

"<br />IF Dx <> Dx2 (1237)  \n AND Px Range (22 - 333) "

It replace my first \n with <br> but not the second \n
0
Hi,
I have a main form displaying data.  Then I have a "Comments" link on each row and on the click of it a partial view with a table opens up.  The partial view is to view/add comments and other data.  In this partial view, after the table, there are textboxes I can fill with data.  After adding data I click on "Add" and when I am done I would click on "Save" and whatever I typed in the textboxes is entered in the database.  This all works and gives you an idea of what I am working with(see attached pics as well).  

What I am looking for now is a way to fill the Ticket Number textbox(on the partial view) with the number from the Number field(on main form).  Also, this number should not be edited on the partial.  How can I achieve that?

I have been unable to find a solution.  Please help.  Thank you.

THIS IS THE CODE IN THE CONTROLLER:
//VIEW ALL COMMENTS AND DISPLAY IN PARTIAL
        [HttpPost]
        public ActionResult ViewComments(int ticketNum)
        {
            List<Comment> AllComments = new List<Comment>();
            using (DBModel db = new DBModel())
                AllComments = db.Comments.Where(x => x.TicketNumber == ticketNum).ToList();

            return PartialView("ViewComments", AllComments);
        }


//INSERT COMMENT
        public JsonResult InsertComments(List<Comment> commentsArray)
        {
            using (DBModel db = new DBModel())
            {
                //Truncate Table to delete all comments. 

Open in new window

0
Hello,

How can I transfer data from the dialog box to the parent window?

I need your help.

I have a parent window and a popup window

1. user open popup window
2. the popup window has a textarea
3. the values that are in the textarea needs to go back to the parent textarea.

I don't know what I'm doing wrong.

Text area in the parent window: 

 @Html.TextArea("ConditionAttributesAndValues", new { @class = "form-control", @style = "width:77%" })

My dialog box in the parent window:

$(function () {
            $('#dialog').dialog({
                autoOpen: false,
                width: 950,
                height:650,
                resizable: true,
                title: 'Condition',
                modal: true,
                open: function(event, ui) {
                    $(this).load("@Url.Action("RulePartialView", "CareAdvanceBusinessRules")")
                    $(".ui-dialog-titlebar-close").hide();
                },
                buttons: {
                    "Close": function () {
                        $(this).dialog("close");
                    }
                },
                closeOnEscape: false,
            });
            $("#opener").click(function (event) {
                event.preventDefault(); 
                $("#dialog").dialog("open");
            });
        });

Open in new window


This is what I have in the dialog box: 

// Here where I need the help 
// I want what ever I have in the textarea to be sent to the parent textarea. 

     $("#AppendConditionToParentBtn").click(function () {
            $('#ContidionsAndAttributesTextArea').text(window.opener.$("#ConditionAttributesAndValues").val());
            $('#dialog').dialog('close');
            return true;
        });

 <button id="AppendConditionToParentBtn" name="AppendConditionToParentBtn" class="btn btn-default" type="button" style="margin-top:10px;margin-bottom:10px;" value="Append">
                        Submit 
                    </button>

Open in new window


I'm getting this error

Unhandled exception at line 513, column 13 in eval code

0x800a138f - JavaScript runtime error: Unable to get property '$' of undefined or null reference
0
Hi,

How can I say if the dropdown list has been selected then append the value or the text to the textarea box.

I'm using bootstrap dropdown list.

  $("#AppendConditionBtn").click(function () {

            var RangeBoxFrom = $("#RangeBoxFrom").val().length;
            var RangeBoxTo = $("#RangeBoxTo").val().length;
            var GetOperatorSelectValue = $("#OperatorSelect option:selected").val();
            var GetConditionSelectValue = $("#ConditionSelect option:selected").text();
            var GetValueSelectValue = $("#ValueSelect option:selected").val();
            var GetGroupSelectValue = $("#GroupSelect option:selected").text();
            var GetItemsTextAreaValue = $("#ItemsTextArea").val();
            var GetOperatorSelectForRangeValue = $("#OperatorSelectForRange option:selected").val();
            var GetConditionSelectForRangeValue = $("#ConditionSelectForRange option:selected").val();
            var GetValueSelectForRangeValue = $("#ValueSelectForRange option:selected").val();
            var GetRangeBoxFromValue = $("#RangeBoxFrom").val();
            var GetRangeBoxToValue = $("#RangeBoxTo").val();

             if (RangeBoxFrom > 6 || RangeBoxTo > 6) {
                 alert("Range should be less than 6 character");
                 return false;
             }

// Here how can I say if the multiselectbox list has been selected then append the value or text to the "ContidionsAndAttributesTextArea"
otherwise don't append. 

        

Open in new window

0
Hi,

my Group select is not triggering my on change event.

1. I have a select dropdown list that select px or dx .....
2. Upon selecting from the first dropdown list the Group select will get populated with a list of dx or px.....
3. ounce the user select from the list of dx or px I need to populate the textarea with the list Item.
but for some reason my Group Select is not triggering my on change event to send the data to the textarea called ItemsTextArea

<script>
    $(document).ready(function () {

       // debugger;

        $('#OperatorSelect').multiselect(getOperatorOptions(true));
        $('#ConditionSelect').multiselect(getOperatorOptions(true));
        $('#ValueSelect').multiselect(getOperatorOptions(true));
        $('#GroupSelect').multiselect(getGroupOptions(true));


        $("#ConditionSelect").change(function (event) {
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedCondition').val(GetValue);
            var method = $('#RulePartialViewForm').attr("method").toLowerCase();
            var action = $('#RulePartialViewForm').attr("action");
            var data = $('#RulePartialViewForm').serialize();
            $.ajax({ method: method, url: action, data: data }).done(
                function (json) {
                    var arr = [ '<option>Select</option>' ];
                    $.each(json, function (i, obj) {
                        arr.push('<option value="' + json[i].Value + '">' + json[i].Text

Open in new window

0
Hi,

This is driving me crazy and I need your help please.

1. I have a dropdown list that has list such as px, dx....
2. I have another dropdown list that gets populated based on the first dropdown list
so if the user select from the first dropdown list px the second dropdown list should get populated with the list of px codes

the problem is when I inspect the element on the second dropdown list I do see my list getting populated and changing upon a different selection
but the issue is I don't see the changes on the bootstrap dropdown list.

This is what I have:

 $('#GroupSelect').multiselect(getGroupOptions(true));       //If I remove this code and the code below it will work but without the style 

        $("#ConditionSelect").change(function (event) {
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedCondition').val(GetValue);
            var method = $('#RulePartialViewForm').attr("method").toLowerCase();
            var action = $('#RulePartialViewForm').attr("action");
            var data = $('#RulePartialViewForm').serialize();
            $.ajax({ method: method, url: action, data: data }).done(
                function (json) {
                    $('#GroupSelect').empty();
                    $('#GroupSelect').append($('<option>').text("Select"));
                    $.each(json, function (i, obj) {
                        $('#GroupSelect').append($('<option>').text(json[i].Text).attr('value', 

Open in new window

0
Hi,

I have a dropdown list on my partial view dialog box

If I remove the class from the <select> and remove the multiselect

my data will get populated but I need to have my style and populate my data

so if I remove from my select this class:
class="btn btn-default dropdown-toggle"
and
remove the multselect function:
//    $('#GroupSelect').multiselect(getGroupOptions(true));

then my select box will get populated but I need my style
how can I have my style and populate my dropdown list?

<script >
    $(document).ready(function () {

        $('#GroupSelect').multiselect(getGroupOptions(true));


   function getGroupOptions(isFilter) {
            return {
                enableFiltering: isFilter,
                enableCaseInsensitiveFiltering: isFilter,
                filterPlaceholder: 'Search ...',
                nonSelectedText: 'Check an option!',
                numberDisplayed: 1,
                maxHeight: 600,
                buttonWidth: '350px'
               
            }
        }


        $("#ConditionSelect").change(function (event) {
           // event.preventDefautlt();
            var GetValue = $(this).val();
            $('#HiddenFieldForSelectedCondition').val(GetValue);
            var method = $('#RulePartialViewForm').attr("method").toLowerCase();
            var action = $('#RulePartialViewForm').attr("action");
            var data = $('#RulePartialViewForm').serialize();
            $.ajax({ method: method, 

Open in new window

0

AJAX

12K

Solutions

7K

Contributors

Asynchronous JavaScript and XML (AJAX) is a group of interrelated Web development techniques used on the client-side to create asynchronous Web applications. With AJAX, web applications can send data to and retrieve from a server asynchronously (in the background) without interfering with the display and behavior of the existing page. HTML and CSS can be used in combination to mark up and style information. The Document Object Model (DOM) is accessed with JavaScript to dynamically display and allow interaction with the information presented.

Top Experts In
AJAX
<
Monthly
>