<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> jQuery.noConflict(); (function ($) { $(document).ready(function() { $('body').find('a[href^="newreply.php"]:not([id])').each(function() { $(this).click(function() { $('a#qr_1').click(); return false; }); }); }); })(jQuery); </script>