B4J Question PopUp Html after Post in a webserver

Alberto Iglesias

Well-Known Member
Licensed User
Longtime User
I see those samples, but no one have a popup AFTER a post, but I got what I needed.

In this index.htm in a B4J webserver, you can get the result with jquery and show a dialog in a div, like this:

My div in index.html

B4X:
    <div id="dialog" title="Result" > </div>

jquery in a index.html to receive the result after post

B4X:
<script type="text/javascript">

    $("#form1").submit(function() {
    $.ajax({
           type: "POST",
           url: "/ReceiveData",
           data: $("#form1").serialize(),
           success: function(result)
           {
             document.getElementById('dialog').innerHTML = result;
             $( "#dialog" ).dialog();

        return false;
    });

Now is working perfectly!
 
Upvote 0
Top