I'm trying modify some code from this site that searches for Threads based on the current Thread Title. So, in showthread_similarthreads template I have added this function to the very top;
PHP Code:
<script language="javascript">
<!--
function checktitle(theform){
window.open('search.php?do=process&titleonly=1&query=$thread[title]','javascript_1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=400'); }
}
//-->
</script>
The function is being called via button in the same template as shown below;
PHP Code:
<input type="button" class="button" value="See More Possible Answers" onClick="checktitle(vbform);">
But it simply doesn't work. Anyone know why and how to make it work?
Thanks!
Ok, solved this one myself also;
PHP Code:
<script language="javascript">
<!--
function checktitle(theform) {
window.open('search.php?do=process&titleonly=0&query=$thread[title]','javascript_1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=400'); }
//-->
</script>