Respond to Dialog()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Respond to Dialog()

Tony Sterrett

I am using HtmlUnit to read and respond  a webpage that contains a JavaScript/Ajax dialog function. This webpage present a JavaScript dialog box. I need to answer this dialog  (in the affirmative) to see the page under it. I've searched but could not find an answer. I'm new to JavaScript, Here is the JavaScript relative code snippet from the server's web page.



$(document).ready(function() {
        $('#divSaleInfo').hide();
        DisplayTerms();

    });

function DisplayTerms() {

    $("#divTerms").dialog({
        modal: true,
        resizable: true,
        hide: {
            effect: 'slide',
            direction: 'right'
        },
        show: {
            effect: 'slide',
            direction: 'right'
        },
        height: 500,
        width: 600,
        buttons: {
            "Agree": function() {
                TermsAccepted();
                $(this).dialog("close");
            },
            "Cancel": function() {
                $(this).dialog("close");
                window.location = "/";
            }
        },
        title: "TERMS AND CONDITIONS FOR USE OF THIS WEB SITE",
        overlay: {
            opacity: 0.5,
            background: "black"
        }
    });
    $('#divTerms').dialog('open');
}


--
Cheers,
Tony Sterrett
[hidden email]

General propositions do not decide concrete cases.

—Oliver Wendell Holmes



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Htmlunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-user