简体   繁体   中英

Create popup box success message with jquery and PHP

How to create a popup box success message with jquery and PHP after submitted without ajax? I usually using only javascript,

<?php 

  $query = //my query insert query
  if($query){
      echo "<script>alert('success submitted');</script>"; // my popup box success message
  }

?>

any suggestion for this? I hope to make it jquery so it looks nicer. Thanks

<?php 

  $query = //my query insert query
  if($query){
      echo "<script>
   $('#selectorId').html('success submitted');

  $('#selector').dialog();</script>"; // my popup box success message
  }

?>

for popup you can use the vode below:

<script language="javascript" type="text/javascript">

function popitup(url) {
    newwindow=window.open(url,'name','height=200,width=150');
    if (window.focus) {newwindow.focus()}
    return false;
}


</script>

<a href="popupex.html" onclick="return popitup('popupex.html')"
    >Link to popup</a>

you can use this the way you want

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM