EasyUI Forum
November 05, 2025, 01:02:13 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Setting a window( or panel) closable cause its closing ! on: July 23, 2014, 08:43:06 AM
Code:
        function startEditing(){
$("#cart-details").window({closable: false}); // close the window !
$("#acceptCart").linkbutton( {disabled: true}); //OK
$("#rejectCart").linkbutton( {disabled: true}); // OK
        }
Nothing more to say ...
2  General Category / EasyUI for jQuery / Re: html tag in JSON form response on: July 22, 2014, 12:08:38 AM
Native JQuery ajax function works so I prefer to keep this solution for form submission. Undecided
Anyway, EasyUI is amazing for everything else ! Wink
3  General Category / EasyUI for jQuery / html tag in JSON form response on: July 18, 2014, 06:47:15 AM
Hi,

My form:
Code:
	$('#formCreate2').form({
type:'POST',
url: 'http://localhost/agrosemens/index.php',
async:true,
cache:false,
dataType:"html",
data: $("#formCreate2").serialize(),
...
success: function(jsonData){
var response = JSON.parse( strData );
...
My PHP script returns
Code:
{"hasError":true,"errors":["<b>Mot de passe<\/b> est requis."]}
but the response received at 'success' event is
Code:
{"hasError":true,"errors":["<b>Mot de passe&lt;\/b&gt; est requis."]}</b>
so the string cannot be parse !

using
Code:
		var request = $.ajax({
  type: "POST",
  url: url,
  data: $("#formCreate2").serialize(),
  dataType: "html"
})
request.success(function( msg ) {
alert( "Returned data: " + msg );
var response = JSON.parse( msg );
console.log(response);
  });
works correctly !
4  General Category / EasyUI for jQuery / Re: Validatebox validation on dynamically created from elements on: July 17, 2014, 08:25:03 AM
Hmmm... and how can I do if have 2 forms and once the first is validated (ajax submit to check availability), all the fields in the first form are injected (prepend) into the second ?
Actually, only the first form is correctly validated but the second returns
Code:
Cannot read property 'options' of undefined
when running
Code:
	$('#formCreate2').form({
onSubmit: function(){
if( $('input#phone').val().length < 10 && $('input#phone_mobile').val().length < 10 ){
$.messager.alert( 'Attention', 'Vous devez entrer au moins un numéro de téléphone !');
return false;
}
return $(this).form('validate');
},
success: function(data){
return false;
}
});
in the second form !
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!