Welcome Guest [Log In] [Register]
Welcome to RUGBY LEAGUE TODAY. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Google to your site
Topic Started: Aug 8 2005, 06:06 PM (83 Views)
Dicko
Member Avatar


This code is in two parts, the first is to be put in your Javascript section:

CODE
Quote:
 
<script type="text/javascript">
<!--
// Script by ChrisD for IFS, this copywrite can not be removed.
function Google(){
var TheElm = document.getElementById("Search1");
var Main  = TheElm.value;
var FullS = new String("http://www.google.com/search?q=" + Main);
window.location.href = FullS;
}
//-->
</script>


The second part can be put where you want it to display:

CODE

Quote:
 
<center>
<form method="post" action="">
<table bgcolor="#FFFFFF">
<tr><td nowrap="nowrap" valign="top" align="center" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="absmiddle" /></a>
<input type="text" id="Search1" name="Search1" size="25" maxlength="255" value="" />
<span style='color:#0000FF;'>
<input type="button" value="Search" OnCLick="Google();" />
</span>
</td>
</tr>
</table>
</form>
</center>


Requirements:
The code is Full XHTML 1.0 complient, CSS Specification 3 complient and DOM level 2 complient.
The code requires a Netscape Navigator Version 6, or an Internet Explorer version 5+ fo function.

Support, problems and suggestions feel free to post below.
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ARCHIVE 2005-2010 · Next Topic »