jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable validation event from PHP

This topic contains 3 replies, has 2 voices, and was last updated by  ivailo 8 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • validation event from PHP #81205

    EricK
    Participant

    Hello to all,
    Using the the function validationSuccess event.
    How can I capture the returning echo from the php?
    The function has an event, but not sure if it captures the returning value from the php or just that the validation was successfull?

    $(“#testForm”).on(‘validationSuccess’, function (event) {
    var ret = event ?????
    });

    If it only returns that the validation was successful, How can I capture the returning php echo?

    validation event from PHP #81225

    ivailo
    Participant

    Hi EricK,

    This demo will be helpful for you.
    Here the response is displayed in iframe.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    validation event from PHP #81511

    EricK
    Participant

    Thanks for the suggestion.

    This example returns html code back to login.

    How can I capture the returning data (echo) to further check that it was success or fail?

    I would like to return a true or false from the login.php

    validation event from PHP #81597

    ivailo
    Participant

    Hi EricK,

    If you want your php script to return true/false only you can change it’s code this way:

    if($formData['username'] == 'admin' && $formData['password'] == 'admin123') {
    	    // get the checked state of the checkbox with name - "rememberme". The value could be true - 
    	    if($formData['rememberme'] == 'true') {
    		    $response = "true";
            }
            else
    		{
                $response = "true";
            }
        }
        else {
            $response = "false";
        }

    Please note also that the jqxValidator have to be used for client side validations only.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.