• hi, I am a wordpress, html and php newbie ?? In “functions.php” I have added these lines to show a “thank you” autoclose popup after someone leave a comment.

    add_filter(‘comment_post_redirect’, ‘redirect_after_comment’);
    function redirect_after_comment($location)
    {
    print(“<script type=’text/javascript’ src=’POPUP/GRAZIE/Grazie_adplib.js’></script>”);
    print(“<script type=’text/javascript’ src=’POPUP/GRAZIE/Grazie.js’></script>”);
    }

    these 2 lines of javascript show a popup of thanks after someone leave a post and work well. but If I add a php line to go to top of page after javascript, the popup it is no longer shown, seems (from newbie) that php has priority over javscript.

    function redirect_after_comment($location)
    {
    print(“<script type=’text/javascript’ src=’POPUP/GRAZIE/Grazie_adplib.js’></script>”);
    print(“<script type=’text/javascript’ src=’POPUP/GRAZIE/Grazie.js’></script>”);
    return $_SERVER[“HTTP_REFERER”];
    }

    The page with this code simply goes on top without showing any pop-up.
    otherwise, how can I insert a simple popup with jquery instead of javascript? thank you ad sorry for my poor english, ciao

  • The topic ‘php "close" javascript’ is closed to new replies.