Hello, I'm trying to get the following script to open in a new window when a user clicks on one of the buttons. Here it is, any help is greatly appriceated.
***********
String.prototype.trim = function()
{
return this.replace(/^\s*|\s*$/g,'');
}
function ProcessInput(e)
{
if (window.event) // IE
keyNum = e.keyCode;else if (e.which) // Netscape/Firefox/Opera
keyNum = e.which; if (keyNum == 13)
{
e.returnValue = false;e.cancelBubble = true;
DoKeywordSearch('KW');
return false;
}
return true;
}
function DoBrowseSearch(strBy)
{
if (document.getElementById('textboxTerm').value.trim() != '')
{
var strURL = 'window.location = strURL + "&type=Browse&Page=0&by=" + strBy + "&term=" + escape (document.getElementById('textboxTerm').value);
}
else document.getElementById('textboxTerm').focus();
}
function DoKeywordSearch(strBy)
{
if (document.getElementById('textboxTerm').value.trim() != '')
{
var strURL = 'window.location = strURL + "&type=Keyword&limit=TOM=*&sort=RELEVENCE&Page=0&by=" + strBy + "&term=" + escape(document.getElementById('textboxTerm').value);
}
else document.getElementById('textboxTerm').focus();
}
</script>
<table> <tr> <td>Search for: </td> <td>
<input type=text id=textboxTerm size=45 onkeypress="return ProcessInput(event)" />
</td> </tr> <tr> <td>Search by: </td> <td>
<input type=button value="Title" onclick="DoBrowseSearch('TI');" />
<input type=button title="Lastname, First" value="Author" onclick="DoBrowseSearch('AU');" />
<input type=button value="Subject" onclick="DoKeywordSearch('SU');" />
<input type=button value="Series" onclick="DoBrowseSearch('SE');" />
<input type=button value="Keyword" onclick="DoKeywordSearch('KW')" />
</td> </tr> </table>
<script language="javascript">
document.getElementById('textboxTerm').focus();
***********
String.prototype.trim = function()
{
return this.replace(/^\s*|\s*$/g,'');
}
function ProcessInput(e)
{
if (window.event) // IE
keyNum = e.keyCode;else if (e.which) // Netscape/Firefox/Opera
keyNum = e.which; if (keyNum == 13)
{
e.returnValue = false;e.cancelBubble = true;
DoKeywordSearch('KW');
return false;
}
return true;
}
function DoBrowseSearch(strBy)
{
if (document.getElementById('textboxTerm').value.trim() != '')
{
var strURL = 'window.location = strURL + "&type=Browse&Page=0&by=" + strBy + "&term=" + escape (document.getElementById('textboxTerm').value);
}
else document.getElementById('textboxTerm').focus();
}
function DoKeywordSearch(strBy)
{
if (document.getElementById('textboxTerm').value.trim() != '')
{
var strURL = 'window.location = strURL + "&type=Keyword&limit=TOM=*&sort=RELEVENCE&Page=0&by=" + strBy + "&term=" + escape(document.getElementById('textboxTerm').value);
}
else document.getElementById('textboxTerm').focus();
}
</script>
<table> <tr> <td>Search for: </td> <td>
<input type=text id=textboxTerm size=45 onkeypress="return ProcessInput(event)" />
</td> </tr> <tr> <td>Search by: </td> <td>
<input type=button value="Title" onclick="DoBrowseSearch('TI');" />
<input type=button title="Lastname, First" value="Author" onclick="DoBrowseSearch('AU');" />
<input type=button value="Subject" onclick="DoKeywordSearch('SU');" />
<input type=button value="Series" onclick="DoBrowseSearch('SE');" />
<input type=button value="Keyword" onclick="DoKeywordSearch('KW')" />
</td> </tr> </table>
<script language="javascript">
document.getElementById('textboxTerm').focus();