<!DOCTYPE HTML>
<html>
<head>
    <title>Jquery Popup Dialog</title>
</head>
<body>
    <link rel="stylesheet" href="bootstrap.css">
    <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
    <script src="jquery.popupoverlay.js"></script>
	
	
	<br><br><br><br><br><br><br><br><br>
	<center>
        <p>
            <button class="my_modal_open btn btn-large btn-success">Open modal</button>
            <button class="my_tooltip_open btn btn-large btn-success">Open tooltip</button>
        </p>
	</center>
        <div id="my_modal" class="well" style="display:none;margin:1em;">
            <a href="#" class="my_modal_close" style="float:right;padding:0 0.4em;">×</a>
            <h4>Modal overlay example</h4>
            <p>Try to change the width and height of browser window, or to rotate your tablet device, and also try to navigate with <kbd>Tab</kbd> key.</p>
            <p>You can close the dialog by pressing the <kbd>Esc</kbd> key, or by clicking on the background outside the content area, or by clicking on the Close button.</p>
            <p>If you don't want to show the outline around the container when focused, you can remove it with <code>.overlay {outline: none}.</code></p>
			<center><form action="" method="POST">
			<input type="text" name="inputfield">
			<input type="submit" name="submit" value="Update">
			</form>
			<?php
				if(!empty($_POST['inputfield'])){
					$field = $_POST['inputfield'];
					echo "you entered: ".$field;
				}

			?>
			</center>

			
            <form>
                <button class="btn btn-alert my_modal_close">Close</button>
            </form>
			
        </div>

        <div id="my_tooltip" class="well">
            <a href="#" class="my_tooltip_close" style="float:right;padding:0 0.4em;">×</a>
            <h4>Tooltip example</h4>
            <p>Tooltip content will be centered.</p>
            <p>You can set the offset by changing the margins in CSS.</p>
        </div>
		
		
<script>
$(document).ready(function() {

    $('.my_modal_open').click(function(){
        $('#my_modal').popup({
            'autoopen': true
        });
    });

    $('#my_tooltip').popup({
        type: 'tooltip',
        autozindex: true,
        horizontal: 'center',
        vertical: 'top'
    });

});
</script>


</body>
</html>