Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //test.html
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Dialog Box Witout Close Button</title>
- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css">
- <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
- <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
- </head>
- <body>
- <button id="dialog_trigger">open the dialog</button>
- <div id="dialog" style="display:none;" title="Dialog Title"><iframe src="dialog.html" width="700" height="700" frameborder="0" noresize="noresize" scrolling="no" ></iframe></div>
- <script>
- $( "#dialog_trigger" ).click(function() {
- $( "#dialog" ).dialog( "open" );
- });
- $("#dialog").dialog({
- autoOpen: false,
- position: 'center' ,
- title: 'Sample Dialog',
- draggable: false,
- width : 500,
- height : 400,
- resizable : true,
- buttons: {
- "Ok": function() {
- var first_name = $('input[name=FirstName]').val();
- //This returns the value of first name.
- var last_name = $('input[name=LastName]').val();
- //This returns the value of last name.
- alert( $('input[name=FirstName]').val());
- $(this).dialog("close");
- }}
- });
- </script>
- </body>
- </html>
- /***************************
- dialog.html
- <!DOCTYPE html>
- <html>
- <body>
- First name: <input type="text" name="FirstName" value="Mickey"><br>
- Last name: <input type="text" name="LastName" value="Mouse"><br>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement