Pop up window message...

Discussion in 'PHP' started by dynx, Jul 29, 2009.

  1. #1
    Hello there!

    Is anyone out there could share his inputs when a user login a pop up window open with message extracted from the database. Like for example "Your support contract with will expire in 1 month!".

    TIA!
     
    dynx, Jul 29, 2009 IP
  2. zandigo

    zandigo Greenhorn

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    This is javascript matters. You should post it in javascript box :D.

    Anyway, here is a way to do that.
    
    <script language="javascript" type="text/javascript">
    <!--
    function popup(url) {
    	newwindow=window.open(url,'Popup','height=200,width=150');
    	if (window.focus) {newwindow.focus()}
    	return false;
    }
    
    // -->
    </script>
    <input type=text name=name onblur="popup(url)">
    
    PHP:
    In url, you just need to post data via GET method, and target page will be php, that will read $_GET and return data from database you want.
     
    zandigo, Jul 29, 2009 IP