Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function doesn't want to fire [closed]
- $( "#login-form" ).dialog({
- autoOpen: false,
- height: 300,
- width: 350,
- resizable: false,
- modal: true,
- buttons: {
- "Вход": function() {
- var bValid = true;
- allFields.removeClass( "ui-state-error" );
- bValid = bValid && checkAcc( loginname,loginpassword );
- if ( bValid ) {
- //If its valid ...
- $( this ).dialog( "close" );
- }
- },
- Изход: function() {
- $( this ).dialog( "close" );
- }
- },
- close: function() {
- allFields.val( "" ).removeClass( "ui-state-error" );
- }
- });
- function checkAcc( u, p ) {
- alert();
- var result;
- $.ajax({
- url: "users.php",
- data: "Username=" + u.val() + "&Password=" + p.val(),
- type: "GET",
- cache: false,
- async: false,
- success: function(Valid){
- if(Valid == "0"){
- result = false;
- u.addClass( "ui-state-error" );
- updateTips("Грешно Потребителско име/Парола!");
- }
- else{
- result = true;
- }
- }
- });
- return result;
- }
- function checkAcc( u, p, element )
Add Comment
Please, Sign In to add comment